Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Eclipse Projects
Eclipse openK User Modules
org.eclipse.openk-usermodules.gridFailureInformation.backend
Commits
b7c2798d
Commit
b7c2798d
authored
Feb 28, 2020
by
dietricf
Browse files
SONARWORK
parent
bfb360a4
Changes
4
Show whitespace changes
Inline
Side-by-side
gfsBackendService/src/main/java/org/eclipse/openk/gridfailureinformation/bpmn/impl/GfiGrid.java
View file @
b7c2798d
...
...
@@ -16,7 +16,6 @@
package
org.eclipse.openk.gridfailureinformation.bpmn.impl
;
import
lombok.extern.log4j.Log4j2
;
import
org.eclipse.openk.gridfailureinformation.bpmn.base.ProcessException
;
import
org.eclipse.openk.gridfailureinformation.bpmn.base.ProcessGrid
;
import
org.springframework.stereotype.Component
;
...
...
@@ -24,18 +23,7 @@ import org.springframework.stereotype.Component;
@Component
public
class
GfiGrid
extends
ProcessGrid
{
public
GfiGrid
()
{
try
{
init
();
}
catch
(
ProcessException
e
)
{
log
.
fatal
(
"Invalid process grid configuration"
,
e
);
throw
new
RuntimeException
(
"Invalid process grid configuration"
);
// NOSONAR _fd
}
}
private
void
init
()
throws
ProcessException
{
// TODO: Create the Grid here
}
}
gfsBackendService/src/test/java/org/eclipse/openk/gridfailureinformation/bpmn/base/UserInteractionTaskImpl.java
View file @
b7c2798d
...
...
@@ -20,6 +20,7 @@ import org.eclipse.openk.gridfailureinformation.bpmn.base.tasks.UserInteractionT
public
class
UserInteractionTaskImpl
extends
UserInteractionTask
<
TestProcessSubject
>
{
public
boolean
leaveStepCalled
=
false
;
public
boolean
enterStepCalled
=
false
;
public
boolean
stayInTask
=
false
;
public
UserInteractionTaskImpl
(
String
description
)
{
super
(
description
);
...
...
@@ -30,6 +31,11 @@ public class UserInteractionTaskImpl extends UserInteractionTask<TestProcessSubj
this
.
leaveStepCalled
=
true
;
}
@Override
protected
boolean
isStayInThisTask
(
TestProcessSubject
model
){
// NOSONAR Parameter needed, if overridden
return
stayInTask
;
}
@Override
protected
void
onEnterStep
(
TestProcessSubject
model
)
throws
ProcessException
{
// implement empty
...
...
@@ -40,4 +46,5 @@ public class UserInteractionTaskImpl extends UserInteractionTask<TestProcessSubj
super
.
enterStep
(
model
);
this
.
enterStepCalled
=
true
;
}
}
gfsBackendService/src/test/java/org/eclipse/openk/gridfailureinformation/bpmn/base/tasks/UserInteractionTaskTest.java
View file @
b7c2798d
...
...
@@ -27,6 +27,7 @@ public class UserInteractionTaskTest {
@Test
public
void
testUserinteractionTask
()
throws
ProcessException
{
UserInteractionTaskImpl
task
=
new
UserInteractionTaskImpl
(
"UI Task"
);
task
.
stayInTask
=
false
;
TestProcessSubject
subject
=
new
TestProcessSubject
();
task
.
enterStep
(
subject
);
assertTrue
(
task
.
enterStepCalled
);
...
...
@@ -37,4 +38,18 @@ public class UserInteractionTaskTest {
}
@Test
public
void
testUserinteractionTaskStayInTask
()
throws
ProcessException
{
UserInteractionTaskImpl
task
=
new
UserInteractionTaskImpl
(
"UI Task"
);
task
.
stayInTask
=
true
;
TestProcessSubject
subject
=
new
TestProcessSubject
();
task
.
enterStep
(
subject
);
assertTrue
(
task
.
enterStepCalled
);
assertFalse
(
task
.
leaveStepCalled
);
task
.
leaveStep
(
subject
);
assertFalse
(
task
.
leaveStepCalled
);
}
}
gfsBackendService/src/test/java/org/eclipse/openk/gridfailureinformation/bpmn/impl/GfiGridTest.java
View file @
b7c2798d
...
...
@@ -18,6 +18,7 @@ package org.eclipse.openk.gridfailureinformation.bpmn.impl;
import
org.eclipse.openk.gridfailureinformation.bpmn.base.*
;
import
org.junit.jupiter.api.Test
;
import
static
org
.
hibernate
.
validator
.
internal
.
util
.
Contracts
.
assertNotNull
;
import
static
org
.
junit
.
jupiter
.
api
.
Assertions
.
assertThrows
;
import
static
org
.
junit
.
jupiter
.
api
.
Assertions
.
assertTrue
;
...
...
@@ -38,4 +39,11 @@ public class GfiGridTest {
assertThrows
(
ProcessException
.
class
,
()
->
theGrid
.
recover
(
subject
).
start
(()->
ProcessStateImpl
.
UNREACHABLE
)
);
}
// wegen intialer Testabdeckung
@Test
public
void
testGfiGridConstr
()
{
ProcessGrid
grid
=
new
GfiGrid
();
assertNotNull
(
grid
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment