Пример #1
0
 protected override void EstablishContext()
 {
     base.EstablishContext();
     Service      = new Mock <IService>();
     Notification = new WcfNotification
     {
         StartTime        = DateTime.UtcNow,
         Message          = "Message",
         ShortDescription = "ShortDescription",
         LongDescription  = "LongDescription"
     };
     Result = new RemapTagsResult
     {
         Notifications = new[] { Notification }
     };
     Service.Setup(s => s.RemapTags(It.Is <RemapTagsParameter[]>(p => p.Length == 1 && p[0] == Parameter)))
     .Returns(new[] { Result }).Verifiable();
 }
Пример #2
0
 protected override void EstablishContext()
 {
     base.EstablishContext();
     Service      = new Mock <IService>();
     Notification = new WcfNotification {
         StartTime        = DateTime.UtcNow,
         Message          = "Message",
         ShortDescription = "ShortDescription",
         LongDescription  = "LongDescription"
     };
     Result = new RemapAlarmResult {
         HasActive         = true,
         HasUnacknowledged = false,
         Current           = new Alarm[0][],
         History           = new Alarm[0][],
         Notifications     = new[] { Notification }
     };
     Service.Setup(s => s.RemapAlarms(It.Is <RemapAlarmsParameter[]>(p =>
                                                                     p.Length == 1 && p[0].CategoryId == Category.Object.Id && p[0].GetStatus)))
     .Returns(new[] { Result }).Verifiable();
 }
Пример #3
0
 private static void OnWcfNotification(NotificationEventArgs e)
 {
     WcfNotification?.Invoke(null, e);
 }