어디에서 MOQ에 대한 포괄적 인 문서를 찾을 수 있습니까? 나는 그냥 조롱하는 것으로 시작하고 그 주위에 머리를 쓰는 데 어려움을 겪고 있습니다. http://code.google.com/p/moq/wiki/QuickStart에있는 모든 링크를 읽었지만 튜토리얼이나 부드러운 소개를 찾을 수 없습니다.MOQ 설명서는 어디에 있습니까?
나는 또한 Rhino Mock을 잠깐 보았지만 매우 혼란 스럽습니다.
예 - 스티븐 왈츠의 기사를 읽었습니다. 매우 유용합니다. 나는 또한 링크를 통해 갔다. 나는 특히 내가 이벤트가 조롱 클래스에서 제기되었는지 여부를 결정하기 위해 노력하고
http://www.bestechvideos.com/2008/06/08/dimecasts-net-introduction-to-mocking-with-moq
[깨진 링크]
에서 비디오를 볼 수없는 것. 컴파일 할 QuickStarts 페이지의 이벤트 예제를 가져올 수 없습니다. Google 그룹에서 Daniel은 CreateEventHandler가 EventHandler<TEventArgs>
유형의 이벤트 만 처리 할 수 있다고 설명했지만 컴파일하더라도 코드를 가져올 수 없습니다.
좀 더 구체적으로 말해서 INotifyChanged
을 구현하는 클래스가 있습니다.
public class Entity : INotifyChanged
{
public event PropertyChangingEventHandler PropertyChanging;
public int Id
{
get {return _id;}
set {
_id = value;
OnPropertyChanged("Id");
}
}
protected void OnPropertyChanged(string property)
{
if (PropertyChanged != null)
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
etc .....
}
PropertyChanged
이벤트가 발생했는지 여부를 테스트하려면 어떻게해야합니까?
Error 1 'CoreServices.Notifier' does not implement interface member System.ComponentModel.INotifyPropertyChanged.PropertyChanged'. 'CoreServices.Notifier.PropertyChanged' cannot implement 'System.ComponentModel.INotifyPropertyChanged.PropertyChanged' because it does not have the matching return type of 'System.ComponentModel.PropertyChangedEventHandler'.
표시된 오류는 시각적 스튜디오/컴파일러 버그입니다. bin 폴더에서 모든 것을 제거하고 다시 작성하십시오. – CodingBarfield
* My answer in Moq * *에 대한 링크가 수정되었습니다. –
링크가 끊어졌습니다 (다시) – PPC