public void CreateNewRequestTransactionNotificationViewTest() { var o = GetRandom.Object <NewRequestTransactionNotification>(); var v = NotificationViewFactory.Create(o); validateCommon(o.Data, v); }
public void CreateWelcomeNotificationViewTest() { var o = GetRandom.Object <WelcomeNotification>(); o.Data.Message = null; var v = NotificationViewFactory.Create(o); validateCommon(o.Data, v); }
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); }
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); }
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); }