Commit 43a704a1 authored by Lionel Seinturier's avatar Lionel Seinturier
Browse files

Remove usage of deprecated method.

parent f62bd37b
......@@ -57,12 +57,12 @@ public class TestBindingController extends AbstractTest {
public void setUpComponents () throws Exception {
Factory f = (Factory)
Class.forName(CCSColFlatPrimitive.class.getName()+"Factory").
newInstance();
getConstructor().newInstance();
c = f.newFcInstance();
d = f.newFcInstance();
f = (Factory)
Class.forName(CCSIJFlatPrimitive.class.getName()+"Factory").
newInstance();
getConstructor().newInstance();
e = f.newFcInstance();
}
......
......@@ -47,16 +47,16 @@ public class TestBindingControllerComposite extends TestBindingController {
super.setUpComponents();
Factory f = (Factory)
Class.forName(CCSColComposite.class.getName()+"Factory").
newInstance();
getConstructor().newInstance();
r = f.newFcInstance();
d = f.newFcInstance();
f = (Factory)
Class.forName(CCSColPrimitive.class.getName()+"Factory").
newInstance();
getConstructor().newInstance();
c = f.newFcInstance();
f = (Factory)
Class.forName(CCSIJComposite.class.getName()+"Factory").
newInstance();
getConstructor().newInstance();
e = f.newFcInstance();
Fractal.getContentController(r).addFcSubComponent(c);
......
......@@ -60,7 +60,7 @@ public class TestCollection extends AbstractTest {
Factory f = (Factory)
Class.forName(CCSColOptPrimitive.class.getName()+"Factory").
newInstance();
getConstructor().newInstance();
Component c = f.newFcInstance();
checkComponent(c, new HashSet<String>(Arrays.asList(new String[] {
......@@ -73,7 +73,7 @@ public class TestCollection extends AbstractTest {
Factory f = (Factory)
Class.forName(CCSColOptComposite.class.getName()+"Factory").
newInstance();
getConstructor().newInstance();
Component c = f.newFcInstance();
checkComponent(c, new HashSet<String>(Arrays.asList(new String[] {
......@@ -90,7 +90,7 @@ public class TestCollection extends AbstractTest {
Factory f = (Factory)
Class.forName(CCSColOptPrimitive.class.getName()+"Factory").
newInstance();
getConstructor().newInstance();
Component c = f.newFcInstance();
Fractal.getLifeCycleController(c).startFc();
......@@ -112,7 +112,7 @@ public class TestCollection extends AbstractTest {
Factory f = (Factory)
Class.forName(CCSColOptComposite.class.getName()+"Factory").
newInstance();
getConstructor().newInstance();
Component c = f.newFcInstance();
Interface i;
......@@ -145,7 +145,7 @@ public class TestCollection extends AbstractTest {
Factory f = (Factory)
Class.forName(CCSColOptPrimitive.class.getName()+"Factory").
newInstance();
getConstructor().newInstance();
Component c = f.newFcInstance();
try {
......@@ -165,7 +165,7 @@ public class TestCollection extends AbstractTest {
Factory f = (Factory)
Class.forName(CCSColOptComposite.class.getName()+"Factory").
newInstance();
getConstructor().newInstance();
Component c = f.newFcInstance();
try {
......
......@@ -47,7 +47,7 @@ public class TestComponent extends AbstractTest {
Factory f = (Factory)
Class.forName(CCSOptParametricPrimitive.class.getName()+"Factory").
newInstance();
getConstructor().newInstance();
Component c = f.newFcInstance();
Fractal.getLifeCycleController(c).startFc();
......
......@@ -48,12 +48,12 @@ public class TestContentController extends AbstractTest {
public void setUpComponents () throws Exception {
Factory fcomposite = (Factory)
Class.forName(CCSComposite.class.getName()+"Factory").
newInstance();
getConstructor().newInstance();
c = fcomposite.newFcInstance();
d = fcomposite.newFcInstance();
Factory fprimitive = (Factory)
Class.forName(CCSPrimitive.class.getName()+"Factory").
newInstance();
getConstructor().newInstance();
e = fprimitive.newFcInstance();
}
......
......@@ -51,7 +51,7 @@ public class TestGenericFactory extends AbstractTest {
Factory f = (Factory)
Class.forName(CCSFlatPrimitive.class.getName()+"Factory").
newInstance();
getConstructor().newInstance();
Component c = f.newFcInstance();
checkComponent(c, new HashSet<String>(Arrays.asList(new String[] {
......@@ -64,7 +64,7 @@ public class TestGenericFactory extends AbstractTest {
Factory f = (Factory)
Class.forName(CCSFlatParametricPrimitive.class.getName()+"Factory").
newInstance();
getConstructor().newInstance();
Component c = f.newFcInstance();
checkComponent(c, new HashSet<String>(Arrays.asList(new String[] {
......@@ -73,14 +73,11 @@ public class TestGenericFactory extends AbstractTest {
}
@Test
public void testPrimitive ()
throws
InstantiationException, IllegalAccessException, ClassNotFoundException,
org.objectweb.fractal.api.factory.InstantiationException {
public void testPrimitive () throws Exception {
Factory f = (Factory)
Class.forName(CCSPrimitive.class.getName()+"Factory").
newInstance();
getConstructor().newInstance();
Component c = f.newFcInstance();
checkComponent(c, new HashSet<String>(Arrays.asList(new String[] {
COMP, BC, LC, SC, NC, sI, cI
......@@ -92,7 +89,7 @@ public class TestGenericFactory extends AbstractTest {
Factory f = (Factory)
Class.forName(CCSParametricPrimitive.class.getName()+"Factory").
newInstance();
getConstructor().newInstance();
Component c = f.newFcInstance();
checkComponent(c, new HashSet<String>(Arrays.asList(new String[] {
COMP, BC, LC, SC, AC, NC, sI, cI
......@@ -104,7 +101,7 @@ public class TestGenericFactory extends AbstractTest {
Factory f = (Factory)
Class.forName(CCSComposite.class.getName()+"Factory").
newInstance();
getConstructor().newInstance();
Component c = f.newFcInstance();
checkComponent(c, new HashSet<String>(Arrays.asList(new String[] {
COMP, BC, CC, LC, SC, NC, sI, cI
......@@ -116,7 +113,7 @@ public class TestGenericFactory extends AbstractTest {
Factory f = (Factory)
Class.forName(CCSParametricComposite.class.getName()+"Factory").
newInstance();
getConstructor().newInstance();
Component c = f.newFcInstance();
checkComponent(c, new HashSet<String>(Arrays.asList(new String[] {
COMP, BC, CC, LC, SC, AC, NC, sI, cI
......
......@@ -47,15 +47,15 @@ public class TestInterceptor extends AbstractTest {
public void setUp () throws Exception {
Factory f = (Factory)
Class.forName(CCSColOptComposite.class.getName()+"Factory").
newInstance();
getConstructor().newInstance();
r = f.newFcInstance();
f = (Factory)
Class.forName(CCSColOptStatComposite.class.getName()+"Factory").
newInstance();
getConstructor().newInstance();
c = f.newFcInstance();
f = (Factory)
Class.forName(CCSColOptStatPrimitive.class.getName()+"Factory").
newInstance();
getConstructor().newInstance();
d = f.newFcInstance();
Fractal.getContentController(r).addFcSubComponent(c);
......
......@@ -45,7 +45,7 @@ public class TestLifeCycleController extends AbstractTest {
public void setUpComponents () throws Exception {
Factory f = (Factory)
Class.forName(CCSColFlatPrimitive.class.getName()+"Factory").
newInstance();
getConstructor().newInstance();
c = f.newFcInstance();
d = f.newFcInstance();
}
......
......@@ -43,7 +43,7 @@ public class TestLifeCycleControllerComposite extends TestLifeCycleController {
super.setUpComponents();
Factory f = (Factory)
Class.forName(CCSColComposite.class.getName()+"Factory").
newInstance();
getConstructor().newInstance();
Component o = f.newFcInstance();
r = f.newFcInstance();
Fractal.getContentController(o).addFcSubComponent(r);
......
......@@ -52,15 +52,15 @@ public class TestProxyInterface extends AbstractTest {
public void setUp () throws Exception {
Factory f = (Factory)
Class.forName(DCComposite.class.getName()+"Factory").
newInstance();
getConstructor().newInstance();
r = f.newFcInstance();
f = (Factory)
Class.forName(DCPrimitive.class.getName()+"Factory").
newInstance();
getConstructor().newInstance();
c = f.newFcInstance();
f = (Factory)
Class.forName(DSPrimitive.class.getName()+"Factory").
newInstance();
getConstructor().newInstance();
d = f.newFcInstance();
setUpComponents();
......@@ -168,15 +168,15 @@ public class TestProxyInterface extends AbstractTest {
public void setUp () throws Exception {
Factory f = (Factory)
Class.forName(DCComposite.class.getName()+"Factory").
newInstance();
getConstructor().newInstance();
r = f.newFcInstance();
f = (Factory)
Class.forName(DCStatPrimitive.class.getName()+"Factory").
newInstance();
getConstructor().newInstance();
c = f.newFcInstance();
f = (Factory)
Class.forName(DSPrimitive.class.getName()+"Factory").
newInstance();
getConstructor().newInstance();
d = f.newFcInstance();
super.setUpComponents();
......
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