예제 #1
0
        public void Test_canGetBoardInfoResponseAsNotEmptyWithFailingURIAsync()
        {
            Uri serverIp = new Uri(serverProtAndIp_failure, UriKind.Absolute);

            PortableGeneralInterfaceLibraryAsync alpha = new PortableGeneralInterfaceLibraryAsync();

            var response = alpha.GetBoardInfoAsync(serverIp);

            string result = response.Result.ToString();

            Assert.AreNotEqual("", result);
        }
예제 #2
0
        public void Test_canGetBoardInfoResponseFailureCodeWithFailingURIAsync()
        {
            Uri serverIp = new Uri(serverProtAndIp_failure, UriKind.Absolute);

            PortableGeneralInterfaceLibraryAsync alpha = new PortableGeneralInterfaceLibraryAsync();

            var response = alpha.GetBoardInfoAsync(serverIp);

            var successCode = (from node in response.Result.Descendants("Status")
                               select new
            {
                ErrorCode = node.Element("ErrorCode").Value.ToString()
            }).Single();

            Assert.AreEqual("10002", successCode.ErrorCode);
        }