public IntegrationTest() { context = GetDbHelper.GetDbContext(); PolicyRepository = new PolicyRepository(context); CustomerRepository = new CustomerRepository(context); CustomerPolicyRepository = new CustomerPolicyRepository(context); }
public void GetCustomersPolicy() { CpeDbContext context = GetDbHelper.GetDbContext(); CustomerPolicyRepository CustomerPolicyRepository = new CustomerPolicyRepository(context); var list = CustomerPolicyRepository.GetAll(); Assert.IsNotNull(list); }
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(); }
public PolicyUnitTest1() { context = GetDbHelper.GetDbContext(); PolicyRepository = new PolicyRepository(context); }