public void AddUserWhenAlreadyExistingUserShouldThrowException() { ChatServerSide server = new ChatServerSide(); server.AddUser("newUser"); Assert.Throws <ArgumentException>(() => server.AddUser("newUser")); }
public void IsNewUserWhenUserExistShouldReturnFalse() { ChatServerSide server = new ChatServerSide(); server.AddUser("newUser"); Assert.False(server.IsNewUser("newUser")); }
public void AddUserWhenNewUserShouldAddUserToHashTable() { ChatServerSide server = new ChatServerSide(); Assert.True(server.IsNewUser("newUser")); server.AddUser("newUser"); Assert.False(server.IsNewUser("newUser")); }
public void AddUserWhenEmptyUserShouldThrowException() { ChatServerSide server = new ChatServerSide(); Assert.Throws <ArgumentException>(() => server.AddUser("")); }
public void AddUserWhenNullUserShouldThrowException() { ChatServerSide server = new ChatServerSide(); Assert.Throws <ArgumentNullException>(() => server.AddUser(null)); }