protected static OrderParameter create(String name, String value) { OrderParameter model = new OrderParameter(); model.setLabel(name); model.setFriendlyLabel(name); model.setFriendlyValue(value); model.setValue(value); return model; }
@Test public void testPersistObject() throws Exception { _logger.info("Starting persist OrderParameter test"); OrderParameter model = new OrderParameter(); model.setLabel("foo"); model.setFriendlyLabel("my friendly name"); model.setFriendlyValue("my friendly value"); model.setUserInput(false); model.setValue("my value"); save(model); model = findById(model.getId()); Assert.assertNotNull(model); Assert.assertEquals("foo", model.getLabel()); Assert.assertEquals("my friendly name", model.getFriendlyLabel()); Assert.assertEquals("my friendly value", model.getFriendlyValue()); Assert.assertEquals(false, model.getUserInput()); Assert.assertEquals("my value", model.getValue()); }