public void TrainTest_ShouldMakeTrainXMLAndGetResponse() { WriteCalls classifierService = new WriteCalls(); //string xmlQuery = XmlBuilder.TrainXML("פלאפל 4 טעמים", "Falafel"); string xmlQuery = XmlBuilder.BuildTrainXML("פלאפל 4 טעמים", "falafel"); //Act bool response = classifierService.Train(xmlQuery); //Assert Assert.IsNotNull(response); Assert.IsTrue(response); }
public void ParseTrainXMLResponse() { WriteCalls classifierService = new WriteCalls(); string xmlQuery = XmlBuilder.BuildTrainXML("פלאפל 4 טעמים", "Falafel"); //Act bool response = classifierService.Train(xmlQuery); //string response = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<uclassify xmlns=\"http://api.uclassify.com/1/ResponseSchema\" version=\"1.01\">\n\t<status success=\"true\" statusCode=\"2000\"/>\n\t<writeCalls>\n\t\t<train id=\"Train\"/>\n\t</writeCalls>\n</uclassify>"; //bool responseStr = XmlReader.ParseTrainXMLResponse(response); //Assert Assert.IsTrue(response); }