FetchTestConnectionAddress() public method

Fetches the test connection address.
public FetchTestConnectionAddress ( ) : String
return String
コード例 #1
0
ファイル: ConnectionTests.cs プロジェクト: Robin--/Warewolf
        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);

        }
コード例 #2
0
ファイル: ConnectionTests.cs プロジェクト: Robin--/Warewolf
        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);
        }