use of org.syncany.operations.daemon.messages.api.Request in project syncany by syncany.
the class XmlMessageFactoryTest method testXmlToRequestSuccess.
@Test
public void testXmlToRequestSuccess() throws Exception {
Request request = XmlMessageFactory.toRequest("<getFileFolderRequest><id>1234</id><root>/some/path</root><fileHistoryId>beefbeefbeef</fileHistoryId><version>1337</version></getFileFolderRequest>");
assertEquals(GetFileFolderRequest.class, request.getClass());
assertEquals(1234, ((GetFileFolderRequest) request).getId());
assertEquals("/some/path", ((GetFileFolderRequest) request).getRoot());
assertEquals("beefbeefbeef", ((GetFileFolderRequest) request).getFileHistoryId());
assertEquals(1337, ((GetFileFolderRequest) request).getVersion());
}
Aggregations