コード例 #1
0
        public void CreateNewRequestTransactionNotificationViewTest()
        {
            var o = GetRandom.Object <NewRequestTransactionNotification>();
            var v = NotificationViewFactory.Create(o);

            validateCommon(o.Data, v);
        }
コード例 #2
0
        public void CreateWelcomeNotificationViewTest()
        {
            var o = GetRandom.Object <WelcomeNotification>();

            o.Data.Message = null;
            var v = NotificationViewFactory.Create(o);

            validateCommon(o.Data, v);
        }
コード例 #3
0
        protected override void validateDbRecords(NotificationData e, NotificationData a)
        {
            var eObj  = NotificationFactory.Create(e);
            var aObj  = NotificationFactory.Create(a);
            var eView = NotificationViewFactory.Create(eObj);
            var aView = NotificationViewFactory.Create(aObj);

            Assert.AreEqual(eView.FormattedMessage, aView.FormattedMessage);
            base.validateDbRecords(e, a);
        }
コード例 #4
0
        public void CreateWithExtremumDatesTest()
        {
            var o = GetRandom.Object <WelcomeNotification>();

            o.Data.ValidFrom = DateTime.MinValue;
            o.Data.ValidTo   = DateTime.MaxValue;
            var v = NotificationViewFactory.Create(o);

            Assert.AreEqual(v.ID, o.Data.ID);
            Assert.AreEqual(v.ValidFrom, null);
            Assert.AreEqual(v.ValidTo, null);
        }
コード例 #5
0
        public void CreateTest()
        {
            var v = NotificationViewFactory.Create((WelcomeNotification)null) as WelcomeNotificationView;

            Assert.IsNotNull(v);
            Assert.AreEqual(v.ID, u);
            Assert.AreEqual(v.Message, u);
            Assert.AreEqual(v.SenderAccountId, u);
            Assert.AreEqual(v.ReceiverAccountId, u);
            Assert.AreEqual(v.ValidFrom, null);
            Assert.AreEqual(v.ValidTo, null);
            Assert.AreEqual(v.IsSeen, false);
        }