コード例 #1
0
        public void VerifyEventOccured(MockEventType eventType, string eventText, bool partialMatch)
        {
            bool found = false;

            foreach (MockEvent evnt in Events)
            {
                if (partialMatch)
                {
                    if (evnt.EventType == eventType && evnt.Payload.Contains(eventText))
                    {
                        found = true;
                        break;
                    }
                }
                else
                {
                    if (evnt.EventType == eventType && evnt.Payload == eventText)
                    {
                        found = true;
                        break;
                    }
                }
            }
            Assert.True(found, "Could not find event of type \"{0}\" with text \"{1}\"", eventType, eventText);
        }
コード例 #2
0
 public void VerifyEventOccured(MockEventType eventType, string eventText, bool partialMatch)
 {
     bool found = false;
     foreach (MockEvent evnt in Events)
     {
         if (partialMatch)
         {
             if (evnt.EventType == eventType && evnt.Payload.Contains(eventText))
             {
                 found = true;
                 break;
             }
         }
         else
         {
             if (evnt.EventType == eventType && evnt.Payload == eventText)
             {
                 found = true;
                 break;
             }
         }
     }
     Assert.True(found, "Could not find event of type \"{0}\" with text \"{1}\"", eventType, eventText);
 }
コード例 #3
0
 public MockEvent(MockEventType type, string payload)
 {
     Time = DateTime.Now;
     EventType = type;
     Payload = payload;
 }
コード例 #4
0
 public MockEvent(MockEventType type, string payload)
 {
     Time      = DateTime.Now;
     EventType = type;
     Payload   = payload;
 }