Example #1
0
        public void CanAddCustomer()
        {
            var repo = new CustomerRepoQA();

            Customer newCustomer = new Customer()
            {
                Name    = "Tester Two",
                Phone   = "111-111-1111",
                Email   = "*****@*****.**",
                Street1 = "456 state street",
                Street2 = "Unit 3",
                City    = "Bergen",
                State   = "KS",
                ZipCode = 43210
            };

            repo.Insert(newCustomer);

            var customers = repo.GetAll();

            Assert.AreEqual(2, customers.Count());
            Assert.AreEqual(2, customers[1].CustomerId);
            Assert.AreEqual("Tester Two", customers[1].Name);
            Assert.AreEqual("111-111-1111", customers[1].Phone);
            Assert.AreEqual("*****@*****.**", customers[1].Email);
            Assert.AreEqual("456 state street", customers[1].Street1);
            Assert.AreEqual("Unit 3", customers[1].Street2);
            Assert.AreEqual("Bergen", customers[1].City);
            Assert.AreEqual("KS", customers[1].State);
            Assert.AreEqual(43210, customers[1].ZipCode);
        }
Example #2
0
        public void CanLoadCustomers()
        {
            var repo      = new CustomerRepoQA();
            var customers = repo.GetAll();

            Assert.AreEqual(2, customers.Count());
            Assert.AreEqual(1, customers[0].CustomerId);
            Assert.AreEqual("Tester One", customers[0].Name);
            Assert.AreEqual("122-222-3344", customers[0].Phone);
            Assert.AreEqual("*****@*****.**", customers[0].Email);
            Assert.AreEqual("123 state street", customers[0].Street1);
            Assert.AreEqual("Apt 101", customers[0].Street2);
            Assert.AreEqual("Newark", customers[0].City);
            Assert.AreEqual("NJ", customers[0].State);
            Assert.AreEqual(07992, customers[0].ZipCode);
        }