コード例 #1
0
 public IntegrationTest()
 {
     context                  = GetDbHelper.GetDbContext();
     PolicyRepository         = new PolicyRepository(context);
     CustomerRepository       = new CustomerRepository(context);
     CustomerPolicyRepository = new CustomerPolicyRepository(context);
 }
コード例 #2
0
        public void GetCustomersPolicy()
        {
            CpeDbContext             context = GetDbHelper.GetDbContext();
            CustomerPolicyRepository CustomerPolicyRepository = new CustomerPolicyRepository(context);
            var list = CustomerPolicyRepository.GetAll();

            Assert.IsNotNull(list);
        }
コード例 #3
0
        public void AddExistingValue()
        {
            CpeDbContext             context = GetDbHelper.GetDbContext();
            CustomerPolicyRepository CustomerPolicyRepository = new CustomerPolicyRepository(context);
            CustomerPolicyModel      customerPolicy           = new CustomerPolicyModel()
            {
                CustomerId = 1,
                PolicyId   = 1
            };

            CustomerPolicyRepository.Add(customerPolicy);
            Assert.Fail();
        }
コード例 #4
0
 public PolicyUnitTest1()
 {
     context          = GetDbHelper.GetDbContext();
     PolicyRepository = new PolicyRepository(context);
 }