コード例 #1
0
 public void Expect(RaiseEventExpectation specification)
 {
     if (_arguments.Count > 0)
     {
         var lastEvent = _arguments.Dequeue();
         if (lastEvent != null)
         {
             specification.CompareTo(lastEvent);
         }
     }
     else
     {
         Assert.Fail("Event was not raised.");
     }
 }
コード例 #2
0
 public static RaiseEventExpectation AsEvent(this NotifyCollectionChangedAction action)
 {
     var result = new RaiseEventExpectation() { Action = action };
     return result;
 }