state1_w1.setConcept(cs.getConcept(5)); state1_w1.setInitial(true); state1_w1.setTerminal(false); state2_w1.setConcept(cs.getConcept(6)); state2_w1.setInitial(false); state2_w1.setTerminal(true); state1_w2.setConcept(cs.getConcept(5)); state1_w2.setInitial(true); state1_w2.setTerminal(false); state2_w2.setConcept(cs.getConcept(6)); state2_w2.setInitial(false); state2_w2.setTerminal(true); state1_w3.setConcept(cs.getConcept(5)); state1_w3.setInitial(true); state1_w3.setTerminal(false); state2_w3.setConcept(cs.getConcept(6)); state2_w3.setInitial(false); state2_w3.setTerminal(true);
state1_w1.setConcept(cs.getConcept(5)); state1_w1.setInitial(true); state1_w1.setTerminal(false); state2_w1.setConcept(cs.getConcept(6)); state2_w1.setInitial(false); state2_w1.setTerminal(true); state1_w2.setConcept(cs.getConcept(5)); state1_w2.setInitial(true); state1_w2.setTerminal(false); state2_w2.setConcept(cs.getConcept(6)); state2_w2.setInitial(false); state2_w2.setTerminal(true);
state1.setConcept(cs.getConcept(5)); state1.setInitial(true); state1.setTerminal(false); state2.setConcept(cs.getConcept(6)); state2.setInitial(false); state2.setTerminal(true);
@Test public void saveProgram_shouldFailIfProgramWorkFlowStateTerminalIsNull() { exception.expect(APIException.class); exception.expectMessage("ProgramWorkflowState concept, initial, terminal are required"); Program program = new Program(); program.setName("TEST PROGRAM"); program.setDescription("TEST PROGRAM DESCRIPTION"); program.setConcept(new Concept(1)); ProgramWorkflow workflow = new ProgramWorkflow(); workflow.setConcept(new Concept(2)); ProgramWorkflowState state1 = new ProgramWorkflowState(); state1.setConcept(new Concept(3)); state1.setInitial(true); workflow.addState(state1); program.addWorkflow(workflow); pws.saveProgram(program); }
@Test public void saveProgram_shouldFailIfProgramWorkFlowStateInitialIsNull() { exception.expect(APIException.class); exception.expectMessage("ProgramWorkflowState concept, initial, terminal are required"); Program program = new Program(); program.setName("TEST PROGRAM"); program.setDescription("TEST PROGRAM DESCRIPTION"); program.setConcept(new Concept(1)); ProgramWorkflow workflow = new ProgramWorkflow(); workflow.setConcept(new Concept(2)); ProgramWorkflowState state1 = new ProgramWorkflowState(); state1.setConcept(new Concept(3)); state1.setTerminal(false); workflow.addState(state1); program.addWorkflow(workflow); pws.saveProgram(program); }
state1Concept.addName(state1ConceptName); ProgramWorkflowState state1 = new ProgramWorkflowState(); state1.setConcept(state1Concept); program.addState(state1); state2Concept.addName(state2ConceptName); ProgramWorkflowState state2 = new ProgramWorkflowState(); state2.setConcept(state2Concept); program.addState(state2);