public void Connection_GetTestConnectionAddress_WhenDsfPresent_ExpectSameAddress() { //------------Setup for test-------------------------- const string address = "http://localhost:3142/dsf"; var conn = new Connection { ResourceType = ResourceType.Server, Address = address }; //------------Execute Test--------------------------- var result = conn.FetchTestConnectionAddress(); //------------Assert Results------------------------- StringAssert.Contains(result, address); }
public void Connection_GetTestConnectionAddress_WhenOnlySlashPresent_ExpectDsfAdded() { //------------Setup for test-------------------------- const string address = "http://localhost:3142/"; const string expected = address + "dsf"; var conn = new Connection { ResourceType = ResourceType.Server, Address = address }; //------------Execute Test--------------------------- var result = conn.FetchTestConnectionAddress(); //------------Assert Results------------------------- StringAssert.Contains(result, expected); }