Commit 168b2f9b authored by Lionel Seinturier's avatar Lionel Seinturier
Browse files

Test for a bug reported by Philippe.

The test is desactivation until the patch is ready.
parent 38fe1e5e
......@@ -19,6 +19,7 @@
* Contact: frascati@ow2.org
*
* Author: Lionel Seinturier
* Contributor: Philippe Merle
*/
package org.ow2.frascati.tinfi;
......@@ -32,6 +33,7 @@ import org.oasisopen.sca.annotation.Reference;
* Component implementation used for testing intent handlers.
*
* @author Lionel Seinturier <Lionel.Seinturier@univ-lille1.fr>
* @author Philippe Merle <Philippe.Merle@inria.fr>
* @since 0.4
*/
@PolicySets(IntentBaseClientItf.COUNT)
......@@ -54,4 +56,10 @@ public class IntentBaseClientImpl implements IntentBaseClientItf {
/** @since 1.4 */
@Reference
public List<Runnable> clients;
/**
* @author Philippe Merle <Philippe.Merle@inria.fr>
* @since 1.4.2
*/
public void run( Object... args ) {}
}
......@@ -19,6 +19,7 @@
* Contact: frascati@ow2.org
*
* Author: Lionel Seinturier
* Contributor: Philippe Merle
*/
package org.ow2.frascati.tinfi;
......@@ -27,6 +28,7 @@ package org.ow2.frascati.tinfi;
* Interface implemented by components used for testing intent handlers.
*
* @author Lionel Seinturier <Lionel.Seinturier@univ-lille1.fr>
* @author Philippe Merle <Philippe.Merle@inria.fr>
* @since 0.4
*/
public interface IntentBaseClientItf extends Runnable {
......@@ -35,4 +37,10 @@ public interface IntentBaseClientItf extends Runnable {
public void runAnnotatedMethod();
public void runUnAnnotatedMethod();
/**
* @author Philippe Merle <Philippe.Merle@inria.fr>
* @since 1.4.2
*/
public void run( Object... args );
}
......@@ -19,6 +19,7 @@
* Contact: frascati@ow2.org
*
* Author: Lionel Seinturier
* Contributor: Philippe Merle
*/
package org.ow2.frascati.tinfi;
......@@ -47,6 +48,7 @@ import org.ow2.frascati.tinfi.api.control.SCAIntentController;
* Class for testing the SCA Intent Controller.
*
* @author Lionel Seinturier <Lionel.Seinturier@univ-lille1.fr>
* @author Philippe Merle <Philippe.Merle@inria.fr>
* @since 1.0
*/
public class SCAIntentControllerTestCase {
......@@ -406,4 +408,25 @@ public class SCAIntentControllerTestCase {
name = itf.getFcItfName();
Assert.assertEquals("binding-controller",name);
}
/**
* @author Philippe Merle <Philippe.Merle@inria.fr>
* @since 1.4.2
*/
/*
* Test deferred until the bug which is revealed is fixed.
*/
// @Test
public void testRunWithVarAgrs()
throws IllegalLifeCycleException, NoSuchInterfaceException {
Fractal.getLifeCycleController(comp).stopFc();
ic.addFcIntentHandler(h);
Fractal.getLifeCycleController(comp).startFc();
itf.run(1,2,3);
int count = countItf.getCount();
Assert.assertEquals(2,count);
}
}
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