コード例 #1
0
ファイル: CommunicationTest.cs プロジェクト: mladjo97/commbus
        public void Test_SendCommand()
        {
            CommunicationBus communicationBus = new CommunicationBus(repoMock.Object);
            Request          reqTest          = new Request("GET", "/resource", "id=2", "name;title");

            string jsonFormat = JsonConvert.SerializeObject(reqTest);

            string sendResponse = communicationBus.SendCommand(jsonFormat);

            string xmlTest  = dbXmlTest.ConvertToXml(testResponse);
            string jsonTest = jsonXmlTest.ConvertFromXml(xmlTest);

            Assert.AreEqual(jsonTest, sendResponse);
        }
コード例 #2
0
        public void Response_To_Xml_Good()
        {
            string result = dbXmlConverter.ConvertToXml(testResponse);

            Assert.AreEqual(expectedXmlFromResponse, result);
        }