@Parameterized.Parameters(name = "{index}: {0}") public static Collection<Object[]> contextPath() { Object[][] data = new Object[][] { { createKieContainerResourceFilter()}, { createReleaseIdFilter() }, { createKieContainerResourceFilter() }, { createListContainersCommand() }, { createCommandScript() } }; return Arrays.asList(data); }
private static CommandScript createCommandScript() { List<KieServerCommand> commands = new ArrayList<KieServerCommand>(); commands.add(createListContainersCommand()); commands.add(createDisposeContainerCommand()); return new CommandScript(commands); }
private static KieContainerResourceFilter createKieContainerResourceFilter() { return new KieContainerResourceFilter(createReleaseIdFilter(), createKieContainerStatusFilter()); }
@Test public void testMapWithDateJSON() { Marshaller marshaller = MarshallerFactory.getMarshaller(MarshallingFormat.JSON, getClass().getClassLoader()); Map<String, Object> map = new HashMap<>(); map.put("date", new Date()); verifyMarshallingRoundTrip(marshaller, map); }
private static ListContainersCommand createListContainersCommand() { return new ListContainersCommand(createKieContainerResourceFilter()); }
@Test public void testJaxb() { Marshaller marshaller = MarshallerFactory.getMarshaller(MarshallingFormat.JAXB, getClass().getClassLoader()); verifyMarshallingRoundTrip(marshaller, testObject); }
@Test public void testXStream() { Marshaller marshaller = MarshallerFactory.getMarshaller(MarshallingFormat.XSTREAM, getClass().getClassLoader()); verifyMarshallingRoundTrip(marshaller, testObject); }
@Test public void testJSON() { Marshaller marshaller = MarshallerFactory.getMarshaller(MarshallingFormat.JSON, getClass().getClassLoader()); verifyMarshallingRoundTrip(marshaller, testObject); }