public void TestConnect_null() //Подключение к нулевому адресу { //arrange ModelClient model = new ModelClient(); ControllerClient controler = new ControllerClient(model); bool expected = false; Thread threadClient = new Thread(new ThreadStart(serverStart)); threadClient.Start(); //act //assert Assert.ThrowsException <NullReferenceException>(() => controler.Connect(null)); }
public void TestConnect_192168125() //Подключение к несуществующему адресу { //arrange ModelClient model = new ModelClient(); ControllerClient controler = new ControllerClient(model); bool expected = false; Thread threadClient = new Thread(new ThreadStart(serverStart)); threadClient.Start(); //act //assert Assert.ThrowsException <NullReferenceException>(() => controler.Connect("192.168.1.25")); }
public void TestConnect_127001() //Подключение к существующему серверу { //arrange ModelClient model = new ModelClient(); ControllerClient controler = new ControllerClient(model); bool expected = true; Thread threadClient = new Thread(new ThreadStart(serverStart)); threadClient.Start(); //act bool actual = controler.Connect("127.0.0.1"); //assert Assert.AreEqual(expected, actual); }
private void Start() { renderServer.Run(); ctrlClient.Connect(); }