コード例 #1
0
        public void NotificationQueries_InsertTest()
        {
            //параметры
            Exception exception;
            var logger = new ShoutExceptionLogger();
            NotificationQueries target = new NotificationQueries(logger
                , SignaloBotTestParameters.ConnectionString, SignaloBotTestParameters.SqlPrefix);

            Notification notify = NotificationsTestCommonCreator.CreateNotification();

            List<NotificationMeta> notifyMetas = new List<NotificationMeta>()
            {
                NotificationsTestCommonCreator.CreateNotificationMeta(notify.NotificationID),
                NotificationsTestCommonCreator.CreateNotificationMeta(notify.NotificationID, "AuthorName"),
            };

            List<Guid> userIDs = new List<Guid>()
            {
                SignaloBotTestParameters.ExistingUserID,
                SequentialGuid.NewGuid(),
                SequentialGuid.NewGuid(),
                SequentialGuid.NewGuid()
            };

            //проверка
            target.Insert(notify, notifyMetas, userIDs, out exception);
        }