Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TeeTime-Framework
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
Nelson Tavares de Sousa
TeeTime-Framework
Commits
af2976c2
Commit
af2976c2
authored
9 years ago
by
Nelson Tavares de Sousa
Browse files
Options
Downloads
Patches
Plain Diff
added test for roundrobin2
parent
0b461065
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/basic/distributor/DistributorTest.java
+23
-0
23 additions, 0 deletions
...java/teetime/stage/basic/distributor/DistributorTest.java
with
23 additions
and
0 deletions
src/test/java/teetime/stage/basic/distributor/DistributorTest.java
+
23
−
0
View file @
af2976c2
...
@@ -74,6 +74,29 @@ public class DistributorTest {
...
@@ -74,6 +74,29 @@ public class DistributorTest {
assertThat
(
this
.
secondIntegers
,
is
(
empty
()));
assertThat
(
this
.
secondIntegers
,
is
(
empty
()));
}
}
@Test
public
void
roundRobin2ShouldWork
()
{
distributor
.
setStrategy
(
new
RoundRobinStrategy2
());
test
(
distributor
).
and
().
send
(
1
,
2
,
3
,
4
,
5
).
to
(
distributor
.
getInputPort
()).
and
().
receive
(
firstIntegers
).
from
(
distributor
.
getNewOutputPort
()).
and
()
.
receive
(
secondIntegers
).
from
(
distributor
.
getNewOutputPort
()).
start
();
assertThat
(
this
.
firstIntegers
,
contains
(
1
,
3
,
5
));
assertThat
(
this
.
secondIntegers
,
contains
(
2
,
4
));
}
@Test
public
void
singleElementRoundRobin2ShouldWork
()
{
distributor
.
setStrategy
(
new
RoundRobinStrategy2
());
test
(
distributor
).
and
().
send
(
1
).
to
(
distributor
.
getInputPort
()).
and
().
receive
(
firstIntegers
).
from
(
distributor
.
getNewOutputPort
()).
and
()
.
receive
(
secondIntegers
)
.
from
(
distributor
.
getNewOutputPort
()).
start
();
assertThat
(
this
.
firstIntegers
,
contains
(
1
));
assertThat
(
this
.
secondIntegers
,
is
(
empty
()));
}
@Test
@Test
public
void
copyByReferenceShouldWork
()
{
public
void
copyByReferenceShouldWork
()
{
distributor
.
setStrategy
(
new
CopyByReferenceStrategy
());
distributor
.
setStrategy
(
new
CopyByReferenceStrategy
());
...
...
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