示例#1
0
        public void ThrowRemoteUserCannotBeNullWhenAddNullRemoteUser()
        {
            string IP   = "127.0.0.1";
            int    port = 4444;

            RemoteDesktop remoteDesktop = new RemoteDesktop(IP, port);

            Assert.Throws <RemoteUserCannotBeNull>(() => remoteDesktop.AddRemoteUser(null));
        }
示例#2
0
        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);
        }
示例#3
0
        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);
        }