package classtest;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import classtest.Test1.Service;
import classtest.Test1.ServiceFactory;
public class TestTest{
private Factories fact ;
ServiceFactory fact2;
Service service ;
@BeforeClass
public static void setUpBeforeClass() throws Exception {
}
@AfterClass
public static void tearDownAfterClass() throws Exception {
}
@Before
public void setUp() throws Exception {
fact = new Factories();
service = new Service()
{
@Override
public void method1() {
// TODO Auto-generated method stub
System.out.println("m1");
}
@Override
public void method2() {
// TODO Auto-generated method stub
System.out.println("m2");
}
};
fact2 = new ServiceFactory()
{
@Override
public Service getService() {
// TODO Auto-generated method stub
return service;
}
};
}
@After
public void tearDown() throws Exception {
}
@Test
public void testinit()
{
fact.serviceConsumer(fact2);
}
}
|