예제 #1
0
        public async Task should_be_ignored_xml_attribute_when_convert_xml_string_to_json()
        {
            string xmlStr   = AccessTestResource.GetTestResourceString("ignore_attribute_xml.txt");
            string expected = AccessTestResource.GetTestResourceString("ignore_attribute_json.txt");

            var actual = await lemonWayWSConnector.XmlToJsonAsync(xmlStr);

            Assert.AreEqual(expected, actual.Result);
        }
예제 #2
0
        private void ExecuteTest(string xmlFileName, string jsonFileName)
        {
            string xmlStr   = AccessTestResource.GetTestResourceString(xmlFileName);
            string expected = AccessTestResource.GetTestResourceString(jsonFileName);

            string actual = _xmlToJsonService.XmlToJson(xmlStr);

            Assert.AreEqual(expected, actual);
        }
예제 #3
0
        public async Task should_communication_ok()
        {
            int    n      = 2;
            string xmlStr = AccessTestResource.GetTestResourceString("first_test_xml.txt");

            var actual1 = await lemonWayWSConnector.ComputeFibonnaciAsync(n);

            var actual2 = await lemonWayWSConnector.XmlToJsonAsync(xmlStr);

            Assert.IsNotNull(actual1.Result);
            Assert.IsNotNull(actual2.Result);
            Assert.IsNull(actual1.Messages);
            Assert.IsNull(actual2.Messages);
        }