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); }
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); }