Beispiel #1
0
        public void CanLoadContactRequests()
        {
            var repo     = new ContactRequestRepoQA();
            var requests = repo.GetAll();

            Assert.AreEqual(2, requests.Count());
            Assert.AreEqual(1, requests[0].ContactRequestId);
            Assert.AreEqual("*****@*****.**", requests[0].Email);
            Assert.AreEqual("Testy McTesterson", requests[0].Name);
            Assert.AreEqual("123-456-7890", requests[0].Phone);
            Assert.AreEqual("Test contact request", requests[0].Message);
        }
Beispiel #2
0
        public void CanAddContactRequest()
        {
            var repo = new ContactRequestRepoQA();

            ContactRequest newRequest = new ContactRequest()
            {
                Name    = "John",
                Email   = "*****@*****.**",
                Phone   = "222-222-2222",
                Message = "Hi this is john"
            };

            repo.Insert(newRequest);

            var requests = repo.GetAll();

            Assert.AreEqual(2, requests.Count());
            Assert.AreEqual(2, requests[1].ContactRequestId);
            Assert.AreEqual("John", requests[1].Name);
            Assert.AreEqual("*****@*****.**", requests[1].Email);
            Assert.AreEqual("222-222-2222", requests[1].Phone);
            Assert.AreEqual("Hi this is john", requests[1].Message);
        }