Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
frascati
frascati
Commits
2055469a
Commit
2055469a
authored
Mar 11, 2013
by
Philippe Merle
Browse files
Added test code to unbind the 'runnables' reference.
parent
1774b82b
Changes
1
Hide whitespace changes
Inline
Side-by-side
examples/runners/src/test/java/org/ow2/frascati/examples/runners/test/RunnerTest.java
View file @
2055469a
...
...
@@ -30,6 +30,7 @@ package org.ow2.frascati.examples.runners.test;
import
org.junit.Test
;
import
org.objectweb.fractal.api.Component
;
import
org.objectweb.fractal.api.Interface
;
import
org.objectweb.fractal.bf.BindingFactory
;
import
org.objectweb.fractal.util.Fractal
;
...
...
@@ -111,8 +112,35 @@ public class RunnerTest
runnable
.
run
();
for
(
int
i
=
0
;
i
<
2
;
i
++)
{
System
.
out
.
println
();
}
Fractal
.
getLifeCycleController
(
componentRunnerMultiple
).
stopFc
();
// Disconnect the 'runnables' reference of the RunnerMultiple component to the 'Runnable' service of the component A, B, C, and D.
Fractal
.
getBindingController
(
componentRunnerMultiple
).
unbindFc
(
"runnables-A"
);
Fractal
.
getBindingController
(
componentRunnerMultiple
).
unbindFc
(
"runnables-B"
);
Fractal
.
getBindingController
(
componentRunnerMultiple
).
unbindFc
(
"runnables-C"
);
Fractal
.
getBindingController
(
componentRunnerMultiple
).
unbindFc
(
"runnables-D"
);
Fractal
.
getBindingController
(
componentRunnerMultiple
).
unbindFc
(
"runnables-D-WS-1"
);
Fractal
.
getBindingController
(
componentRunnerMultiple
).
unbindFc
(
"runnables-D-WS-2"
);
Fractal
.
getLifeCycleController
(
componentRunnerMultiple
).
startFc
();
// RunnerMultiple will be invoked.
runnable
.
run
();
for
(
int
i
=
0
;
i
<
2
;
i
++)
{
System
.
out
.
println
();
}
for
(
Object
o
:
componentRunnerMultiple
.
getFcInterfaces
())
{
Interface
fractalInterface
=
(
Interface
)
o
;
System
.
out
.
println
(
"* "
+
fractalInterface
.
getFcItfName
());
}
for
(
int
i
=
0
;
i
<
2
;
i
++)
{
System
.
out
.
println
();
}
for
(
String
name
:
Fractal
.
getBindingController
(
componentRunnerMultiple
).
listFc
())
{
System
.
out
.
println
(
"* "
+
name
);
}
for
(
int
i
=
0
;
i
<
2
;
i
++)
{
System
.
out
.
println
();
}
frascati
.
close
(
composite
);
frascati
.
close
();
}
}
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment