unit testing a class with event and delegate

后端 未结 3 1915
北恋
北恋 2020-12-30 16:20

I am new to testing please help.

I have the following class

public delegate void OnInvalidEntryMethod(ITnEntry entry, string message);

public class          


        
3条回答
  •  萌比男神i
    2020-12-30 16:49

    Your test should subscribe to the event OnInvalidEntry with a dummy method, call IsValidEntry and check the result.

提交回复
热议问题