Rev | Line | |
---|
[1240] | 1 | package gov.va.med.edp.dao.rpc;
|
---|
| 2 |
|
---|
| 3 | import gov.va.med.edp.rpc.AbstractVistaLinkConnectionTest;
|
---|
| 4 |
|
---|
| 5 | import java.util.HashMap;
|
---|
| 6 | import java.util.List;
|
---|
| 7 | import java.util.ArrayList;
|
---|
| 8 |
|
---|
| 9 | public class VistaLinkTrackingDaoTest extends AbstractVistaLinkConnectionTest {
|
---|
| 10 | private VistaLinkTrackingDao dao;
|
---|
| 11 |
|
---|
| 12 | protected String getStationNumber() {
|
---|
| 13 | return "500";
|
---|
| 14 | }
|
---|
| 15 |
|
---|
| 16 | protected void setUp() throws Exception {
|
---|
| 17 | super.setUp();
|
---|
| 18 |
|
---|
| 19 | dao = new VistaLinkTrackingDao();
|
---|
| 20 | dao.setConnectionFactoryLocator(mockConnectionFactoryLocator);
|
---|
| 21 | dao.afterPropertiesSet();
|
---|
| 22 | }
|
---|
| 23 |
|
---|
| 24 | public void testExecuteCommand() {
|
---|
| 25 | expectVistaLinkDuzConnection("foo");
|
---|
| 26 |
|
---|
| 27 | List params = new ArrayList();
|
---|
| 28 | params.add(new HashMap());
|
---|
| 29 | expectRpcAndReturn(VistaLinkTrackingDao.EDPF_TRACKING_SYSTEM_CONTEXT, VistaLinkTrackingDao.EDP_CONTROLLER_RPC, params,"bar");
|
---|
| 30 |
|
---|
| 31 | replay();
|
---|
| 32 |
|
---|
| 33 | String result = dao.executeCommand("500", "foo", new HashMap());
|
---|
| 34 | assertEquals("bar", result);
|
---|
| 35 |
|
---|
| 36 | verify();
|
---|
| 37 | }
|
---|
| 38 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.