Commit bfb360a4 authored by dietricf's avatar dietricf
Browse files

SONARWORK

parent 2422f4d8
......@@ -16,9 +16,9 @@
package org.eclipse.openk.gridfailureinformation.bpmn.base.tasks;
import lombok.extern.log4j.Log4j2;
import org.eclipse.openk.gridfailureinformation.bpmn.base.ProcessTask;
import org.eclipse.openk.gridfailureinformation.bpmn.base.ProcessException;
import org.eclipse.openk.gridfailureinformation.bpmn.base.ProcessSubject;
import org.eclipse.openk.gridfailureinformation.bpmn.base.ProcessTask;
import java.util.EnumMap;
import java.util.Map;
......@@ -55,11 +55,6 @@ public abstract class DecisionTask<T extends ProcessSubject> extends BaseTask<T>
throw new ProcessException("onLeaveStep must not be called on a decision task object");
}
@Override
protected void onEnterStep(T model) throws ProcessException {
}
@Override
protected void onRecover(T model) throws ProcessException {
// Entry-point is enter!
......
......@@ -23,6 +23,11 @@ public class DecisionTaskImpl extends DecisionTask<TestProcessSubject> {
super(description);
}
@Override
protected void onEnterStep(TestProcessSubject model) throws ProcessException {
// NOSONAR needs to exist
}
@Override
public OutputPort decide(TestProcessSubject model) throws ProcessException {
if( model.yes ) {
......
......@@ -120,4 +120,15 @@ public class DecisionTaskTest {
assertThrows( ProcessException.class, () -> desc.enterStep(subject) ); // should throw exception
}
@Test
public void testOnRecover( ) throws Exception {
setup();
TestProcessSubject subject = new TestProcessSubject();
subject.yes = true;
decTask.onRecover(subject);
Whitebox.invokeMethod(decTask, "onEnterStep", null);
assertNotNull(subject);
}
}
......@@ -15,7 +15,6 @@
package org.eclipse.openk.gridfailureinformation.bpmn.impl;
import org.apache.tomcat.jni.Proc;
import org.eclipse.openk.gridfailureinformation.bpmn.base.*;
import org.junit.jupiter.api.Test;
......@@ -32,6 +31,7 @@ public class GfiGridTest {
assertTrue(serviceTask.leaveStepCalled);
}
@Test
public void testProcessGrid_unreachable() throws ProcessException {
ProcessGridImpl theGrid = new ProcessGridImpl();
TestProcessSubject subject = new TestProcessSubject();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment