public void CreateNetworkAdapterWithIncorrectValues2() { // arrange NetworkAdapterConstructor na = new NetworkAdapterConstructor(IPAddress.Parse(null), 12345); // act // assert }
public void CreateNetworkAdapterWithIncorrectValues() { // arrange NetworkAdapterConstructor na = new NetworkAdapterConstructor("localhost", -3); // act // assert }
public void CreateNetworkAdapterWithStringFirstParamWithCorrectValue() { // arrange NetworkAdapterConstructor na = new NetworkAdapterConstructor("localhost", 12345); // act // assert Assert.IsTrue(true); }
public void CreateNetworkAdapterWithIpAddressFirstParamWithCorrectValue() { // arrange NetworkAdapterConstructor na = new NetworkAdapterConstructor(IPAddress.Parse("192.168.0.1"), 12345); // act // assert Assert.IsTrue(true); }
public void SendAndReceiveGenericMethodForCorrectMessage() { // arrange NetworkAdapterConstructor na = new NetworkAdapterConstructor("localhost", 12345); SolveRequestResponse msg, msg_correct; msg_correct = new SolveRequestResponse() { Id = 1 }; // act server.Start(); na.StartConnection(); na.Send<SolveRequest>(sr, false); msg = na.Receive<SolveRequestResponse>(false); na.CloseConnection(); server.Stop(); // assert Assert.IsTrue(true); Assert.Equals(msg, msg_correct); }
public void SendGenericMethodForCorrectMessage() { // arrange NetworkAdapterConstructor na = new NetworkAdapterConstructor("localhost", 12345); bool condition; // act server.Start(); condition = na.Send<SolveRequest>(sr, true); na.CloseConnection(); server.Stop(); // assert Assert.IsTrue(condition); }
public void StopConnectionForWholeServerInstanceWorking() { // arrange NetworkAdapterConstructor na = new NetworkAdapterConstructor("localhost", 12345); // act server.Start(); na.CloseConnection(); server.Stop(); // assert Assert.IsTrue(true); }