private void validateEntity(NewInsuranceNotificationView expected, NewInsuranceNotificationData actual)
 {
     Assert.IsNotNull(expected);
     Assert.IsNotNull(actual);
     Assert.AreEqual(expected.ID, actual.ID);
     Assert.AreEqual(expected.Message, actual.Message);
     Assert.AreEqual(expected.SenderAccountId, actual.SenderId);
     Assert.AreEqual(expected.ReceiverAccountId, actual.ReceiverId);
     Assert.AreEqual(expected.IsSeen, actual.IsSeen);
     Assert.AreEqual(expected.InsuranceType, actual.InsuranceType);
     validateDates(expected.ValidFrom, actual.ValidFrom);
     validateDates(expected.ValidTo, actual.ValidTo);
 }
Example #2
0
        public static NewInsuranceNotification CreateNewInsuranceNotification(string id, string senderId, string accountId,
                                                                              string type, bool?isSeen = false,
                                                                              DateTime?validFrom       = null, DateTime?validTo = null)
        {
            var r = new NewInsuranceNotificationData {
                ID            = id,
                SenderId      = senderId,
                ReceiverId    = accountId,
                InsuranceType = type,
                IsSeen        = isSeen,
                ValidFrom     = validFrom ?? DateTime.MinValue,
                ValidTo       = validTo ?? DateTime.MaxValue
            };

            return(new NewInsuranceNotification(r));
        }
Example #3
0
 private static NewInsuranceNotification create(NewInsuranceNotificationData data)
 {
     return(new NewInsuranceNotification(data));
 }