Ejemplo n.º 1
0
        public void NewClientIdTest()
        {
            AquariumControl target = new AquariumControl(); // TODO: Initialize to an appropriate value

            target.AddClientWindow(new FishServer.ClientWindow(0, target, new System.Drawing.Rectangle()));
            target.AddClientWindow(new FishServer.ClientWindow(2, target, new System.Drawing.Rectangle()));
            target.AddClientWindow(new FishServer.ClientWindow(1, target, new System.Drawing.Rectangle()));

            int expected = 1; // TODO: Initialize to an appropriate value
            int actual;

            actual = target.NewClientId();
            Assert.AreEqual(expected, actual);
            //Assert.Inconclusive("Verify the correctness of this test method.");
        }
Ejemplo n.º 2
0
        //------------------------- Implement IFishServies ---------------------//

        public void Connect()
        {
            Rectangle    sight  = new Rectangle(_aquariumControl.Width / 4, _aquariumControl.Height / 4, _aquariumControl.Width / 2, _aquariumControl.Height / 2);
            ClientWindow window = new ClientWindow(_clientId, _aquariumControl, sight);

            _aquariumControl.AddClientWindow(window);
        }