Esempio n. 1
0
        public void Should_create_InsurancePolicy_domain_object_graph_when_creating_PolicyDataGridViewModel_with_default_constructor()
        {
            var dataGridViewModel  = new PolicyDataGridViewModel();
            var defaultEmptyPolicy = dataGridViewModel.InsurancePolicy;

            Xenios.Test.Helpers.InsurancePolicyHelper.AssertAreEqual(defaultEmptyPolicy, dataGridViewModel);
        }
 public static void AssertAreEqual(Domain.Models.InsurancePolicy policy, PolicyDataGridViewModel dataGridViewModel)
 {
     Assert.AreEqual(policy.CoverageBeginDateTime, dataGridViewModel.CoverageBeginDateTime);
     Assert.AreEqual(policy.Customer.AddressLine1, dataGridViewModel.CustomerAddressLine1);
     Assert.AreEqual(policy.Customer.City, dataGridViewModel.CustomerCity);
     Assert.AreEqual(policy.Customer.Country, dataGridViewModel.CustomerCountry);
     Assert.AreEqual(policy.Customer.FirstName, dataGridViewModel.CustomerFirstName);
     Assert.AreEqual(policy.Customer.LastName, dataGridViewModel.CustomerLastName);
     Assert.AreEqual(policy.Customer.PostalCode, dataGridViewModel.CustomerPostalCode);
     Assert.AreEqual(policy.Customer.State, dataGridViewModel.CustomerState);
     Assert.AreEqual(policy.InsuranceType, dataGridViewModel.InsuranceType);
     Assert.AreEqual(policy.PaymentInformation.CreditCardNumber, dataGridViewModel.PaymentInformationCreditCardNumber);
     Assert.AreEqual(policy.PaymentInformation.CreditCardType, dataGridViewModel.PaymentInformationCreditCardType);
     Assert.AreEqual(policy.PaymentInformation.CreditCardVerificationNumber, dataGridViewModel.PaymentInformationCreditCardVerificationNumber);
     Assert.AreEqual(policy.PaymentInformation.ExpirationDate, dataGridViewModel.PaymentInformationExpirationDate);
     Assert.AreEqual(policy.Price, dataGridViewModel.Price);
     Assert.AreEqual(policy.TermLength, dataGridViewModel.TermLength);
     Assert.AreEqual(policy.TermUnit, dataGridViewModel.TermUnit);
 }
Esempio n. 3
0
 public void InitializeTest()
 {
     _policy            = Xenios.Test.Helpers.InsurancePolicyHelper.CreateInsurancePolicy();
     _dataGridViewModel = new PolicyDataGridViewModel(_policy);
 }