예제 #1
0
 void manager_NotificationRaised(FileTransferQueueManager.NotificationType type, FileItem item)
 {
     if (!receivedEvents.ContainsKey(type))
     {
         receivedEvents.Add(type, new List <FileItem>());
     }
     receivedEvents[type].Add(item);
 }
예제 #2
0
 private void AssertOnlyOneNotificationReceived(FileTransferQueueManager.NotificationType type, string identifier)
 {
     Assert.True(receivedEvents.ContainsKey(type));
     Assert.AreEqual(1, receivedEvents[type].Count);
     Assert.AreEqual(identifier,
                     string.IsNullOrEmpty(receivedEvents[type][0].Identifier)
             ? receivedEvents[type][0].DestPath
             : receivedEvents[type][0].Identifier);
 }