/** @see {@link HtmlFormEntryUtil#getState(String,Program)} */ @Test @Verifies( value = "should return the state with the matching id", method = "getState(String,Program)") public void getStateProgram_shouldReturnTheStateWithTheMatchingId() throws Exception { Assert.assertEquals( "92584cdc-6a20-4c84-a659-e035e45d36b0", HtmlFormEntryUtil.getState("1", Context.getProgramWorkflowService().getProgram(1)) .getUuid()); }
/** @see {@link HtmlFormEntryUtil#getState(String,Program)} */ @SuppressWarnings("deprecation") @Test @Verifies( value = "should return the state with the matching uuid", method = "getState(String,ProgramWorkflow)") public void getStateWorkflow_shouldReturnTheStateWithTheMatchingUuid() throws Exception { Assert.assertEquals( "1", HtmlFormEntryUtil.getState( "92584cdc-6a20-4c84-a659-e035e45d36b0", Context.getProgramWorkflowService().getWorkflow(1)) .getId() .toString()); }
/** @see {@link HtmlFormEntryUtil#getState(String,Program)} */ @Test @Verifies( value = "should look up a state by a concept mapping", method = "getState(String,Program)") public void getStateProgram_shouldLookUpAStateByAConceptMapping() throws Exception { // load this data set so that we get the additional patient program with concept mapping executeDataSet( XML_DATASET_PATH + new TestUtil().getTestDatasetFilename(XML_REGRESSION_TEST_DATASET)); Assert.assertEquals( "6de7ed10-53ad-11e1-8cb6-00248140a5eb", HtmlFormEntryUtil.getState( "SNOMED CT: Test Code", Context.getProgramWorkflowService().getProgram(10)) .getUuid()); }