public void Handle_createsWith1and2_contactListSizeIs1() { ConnectionData data = new ConnectionData(); IRequestHandler handler = new ContactRequestHandler(data); IRequest request = new ContactRequest("1", "2"); handler.Handle(request); int expected = 1; int actual = data.ContactList.Size; Assert.AreEqual(expected, actual); }
public void Handle_createsWith1and2_1stContactNickIs1() { ConnectionData data = new ConnectionData(); IRequestHandler handler = new ContactRequestHandler(data); IRequest request = new ContactRequest("1", "2"); handler.Handle(request); string expected = "1"; string actual = data.ContactList.GetByIndex(0).Nickname; Assert.AreEqual(expected, actual); }
public void Handle_createsWith1and2_updateContactListIsTrue() { ConnectionData data = new ConnectionData(); IRequestHandler handler = new ContactRequestHandler(data); IRequest request = new ContactRequest("1", "2"); handler.Handle(request); bool expected = true; bool actual = data.ContactList.Updated; Assert.AreEqual(expected, actual); }