Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kieker-TeeTime-Stages
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeeTime
Kieker-TeeTime-Stages
Commits
d6fda970
Commit
d6fda970
authored
10 years ago
by
Christian Wulf
Browse files
Options
Downloads
Patches
Plain Diff
refactored test
parent
6a1f907d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/test/java/teetime/stage/opad/filter/AnomalyDetectionFilterTest.java
+7
-5
7 additions, 5 deletions
...teetime/stage/opad/filter/AnomalyDetectionFilterTest.java
with
7 additions
and
5 deletions
src/test/java/teetime/stage/opad/filter/AnomalyDetectionFilterTest.java
+
7
−
5
View file @
d6fda970
...
...
@@ -24,6 +24,7 @@ import static org.junit.Assert.assertThat;
import
static
teetime
.
framework
.
test
.
StageTester
.
test
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Collection
;
import
java.util.List
;
...
...
@@ -46,9 +47,10 @@ public class AnomalyDetectionFilterTest {
private
StorableDetectionResult
input3
;
private
StorableDetectionResult
input4
;
private
StorableDetectionResult
input5
;
private
List
<
StorableDetectionResult
>
inputElements
;
List
<
StorableDetectionResult
>
resultsNormalPort
;
List
<
StorableDetectionResult
>
resultsAnnormalPort
;
private
List
<
StorableDetectionResult
>
resultsNormalPort
;
private
List
<
StorableDetectionResult
>
resultsAnnormalPort
;
@Before
public
void
initializeAnomalyDetectionFilterAndInputs
()
{
...
...
@@ -57,7 +59,7 @@ public class AnomalyDetectionFilterTest {
input2
=
new
StorableDetectionResult
(
"Test2"
,
2
,
1
,
1
,
1
);
input3
=
new
StorableDetectionResult
(
"Test3"
,
6
,
1
,
1
,
1
);
input4
=
new
StorableDetectionResult
(
"Test4"
,
7
,
1
,
1
,
1
);
input
5
=
new
StorableDetectionResult
(
"Test4"
,
10
,
1
,
1
,
1
);
input
Elements
=
Arrays
.
asList
(
input1
,
input2
,
input3
,
input4
);
resultsNormalPort
=
new
ArrayList
<
StorableDetectionResult
>();
resultsAnnormalPort
=
new
ArrayList
<
StorableDetectionResult
>();
...
...
@@ -89,14 +91,14 @@ public class AnomalyDetectionFilterTest {
@Test
public
void
bothOutputPortsShouldForwardElements
()
{
Collection
<
Pair
<
Thread
,
Throwable
>>
exceptions
;
exceptions
=
test
(
adf
).
and
().
send
(
input
1
,
input2
,
input3
,
input4
).
to
(
adf
.
getInputPort
())
exceptions
=
test
(
adf
).
and
().
send
(
input
Elements
).
to
(
adf
.
getInputPort
())
.
and
().
receive
(
resultsNormalPort
).
from
(
adf
.
getOutputPortNormal
())
.
start
();
assertThat
(
exceptions
,
is
(
empty
()));
assertThat
(
resultsNormalPort
,
is
(
not
(
empty
())));
assertThat
(
resultsNormalPort
,
contains
(
input1
,
input2
));
exceptions
=
test
(
adf
).
and
().
send
(
input
1
,
input2
,
input3
,
input4
,
input5
).
to
(
adf
.
getInputPort
())
exceptions
=
test
(
adf
).
and
().
send
(
input
Elements
).
to
(
adf
.
getInputPort
())
.
and
().
receive
(
resultsAnnormalPort
).
from
(
adf
.
getOutputPortAnnormal
())
.
start
();
assertThat
(
exceptions
,
is
(
empty
()));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment