Beispiel #1
0
        public void Test_canGetExternalMediaStatusResponseAsNotEmptyWithFailingURIAsync()
        {
            Uri serverIp = new Uri(serverProtAndIp_failure, UriKind.Absolute);

            PortableGeneralInterfaceLibraryAsync alpha = new PortableGeneralInterfaceLibraryAsync();

            var response = alpha.GetExternalMediaStatusAsync(serverIp);

            string result = response.Result.ToString();

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

            PortableGeneralInterfaceLibraryAsync alpha = new PortableGeneralInterfaceLibraryAsync();

            var response = alpha.GetExternalMediaStatusAsync(serverIp);

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

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