Пример #1
0
 public DomainNotification(string key, Object request, NotificationCode resultCode)
 {
     DomainNotificationId = Guid.NewGuid();
     Version    = 1;
     Key        = key;
     request    = request;
     ResultCode = resultCode;
 }
Пример #2
0
 /// <summary>
 /// Intialize Abstract Notification
 /// </summary>
 /// <param name="name">the name of the notification</param>
 /// <param name="notificationCode">The notification</param>
 public AbstractNotification(string name, NotificationCode notificationCode)
 {
     this._name = name;
     this._notificationCode = notificationCode;
     this._notificationid = Guid.NewGuid();
 }
Пример #3
0
        internal virtual void ShouldNotifyInStreamWithDetail(string version, string query, InputPosition pos, NotificationCode code, NotificationDetail detail)
        {
            //when
            Result result = Db().execute(version + query);

            //then
            NotificationCode.Notification notification = code.notification(pos, detail);
            assertThat(Iterables.asList(result.Notifications), Matchers.hasItems(notification));
            IDictionary <string, object> arguments = result.ExecutionPlanDescription.Arguments;

            assertThat(arguments["version"], equalTo(version));
            result.Close();
        }