import junit.framework.TestCase;
import com.springbook.Bike;
import com.springbook.RentABike;
import org.springframework.context.support.FileSystemXmlApplicationContext;
import org.springframework.context.ApplicationContext;
public class RemotingTest extends TestCase {
private ApplicationContext ctx;
private RentABike rental = null;
public void setUp() throws Exception {
ctx = new FileSystemXmlApplicationContext(
"/war/WEB-INF/rentaBikeApp-servlet.xml");
rental = (RentABike)ctx.getBean("rentabikeHttpProxy");
}
public void testRemoting() throws Exception {
Bike b = rental.getBike(1);
assertNotNull(b);
//etc.
}
}
|