Beispiel #1
0
        public void CanAddAndRemoveContacts()
        {
            var repo = new AccountRepositoryADO();

            repo.AddContact("11111111-1111-1111-1111-111111111111", 5);
            var contacts = repo.GetContacts(Guid.Empty.ToString());

            Assert.AreEqual(3, contacts.Count());
            repo.RemoveContact("11111111-1111-1111-1111-111111111111", 3);
            contacts = repo.GetContacts(Guid.Empty.ToString());

            Assert.AreEqual(2, contacts.Count());
        }
Beispiel #2
0
        public void CanLoadContacts()
        {
            var repo     = new AccountRepositoryADO();
            var contacts = repo.GetContacts(Guid.Empty.ToString()).ToList();

            Assert.AreEqual(2, contacts.Count());
            Assert.AreEqual(1, contacts[0].ListingId);
            Assert.AreEqual("11111111-1111-1111-1111-111111111111", contacts[0].UserId);
            Assert.AreEqual("Test shack 1", contacts[0].Nickname);
            Assert.AreEqual("OH", contacts[0].StateId);
            Assert.AreEqual("Cleveland", contacts[0].City);
            Assert.AreEqual(100M, contacts[0].Rate);
            Assert.AreEqual("*****@*****.**", contacts[0].Email);
        }