public void ThrowRemoteUserCannotBeNullWhenAddNullRemoteUser() { string IP = "127.0.0.1"; int port = 4444; RemoteDesktop remoteDesktop = new RemoteDesktop(IP, port); Assert.Throws <RemoteUserCannotBeNull>(() => remoteDesktop.AddRemoteUser(null)); }
static public RemoteDesktop CreateRemoteDesktopWidthRemoteUsers(Client client, string IP, int port, IList <RemoteUser> remoteUsers) { var remotedesktop = new RemoteDesktop(IP, port); foreach (var remoteuser in remoteUsers) { remotedesktop.AddRemoteUser(remoteuser); } client.AddRemoteDestop(remotedesktop); return(remotedesktop); }
public void AddRemoteUserToItsRemoteUsersProperty() { string testuser = "******"; string testpassword = "******"; string IP = "127.0.0.1"; int port = 4444; RemoteUser remoteUser = new RemoteUser(testuser, testpassword); RemoteDesktop remoteDesktop = new RemoteDesktop(IP, port); remoteDesktop.AddRemoteUser(remoteUser); Assert.Contains(remoteUser, remoteDesktop.RemoteUsers); }