예제 #1
0
파일: Process.java 프로젝트: swiec/quahive
 public void addStep(final Step testStep) throws RuntimeException {
   if (!testSteps.contains(testStep)) {
     testSteps.add(testStep);
     testStepsIds.add(testStep.getStepId());
   } else
     throw new EntityExistanceException(
         "StepId: '" + testStep + "' already exists in this process. StepId has to be unique.");
 }
예제 #2
0
파일: Process.java 프로젝트: swiec/quahive
 public void replaceStep(final Step testStep) throws RuntimeException {
   if (testSteps.contains(testStep)) {
     final int stepIndex = testSteps.indexOf(testStep);
     testSteps.set(stepIndex, testStep);
     testStepsIds.set(stepIndex, testStep.getStepId());
   } else
     throw new EntityExistanceException(
         "StepId: '" + testStep + "' doesnt' exists in this process. Step couldn't be replaced.");
 }