Collection factoryIds = m_context.getFactoryIds().keySet(); for (Iterator i = factoryIds.iterator(); i.hasNext();) { String factoryId = (String) i.next(); Gateway gateway = m_context.newGateway(factoryId); assertEquals(gateway.getClass(), m_appContext.getBean(factoryId).getClass()); assertNotNull(gateway.getModelFilesContext());
Collection models = m_context.getAvailableGatewayModels(); for (Iterator i = models.iterator(); i.hasNext();) { PhoneModel model = (PhoneModel) i.next(); Gateway gateway = m_context.newGateway(model); String beanId = model.getBeanId(); assertEquals(gateway.getClass(), m_appContext.getBean(beanId).getClass()); if(beanId.equals("gwGeneric")) { assertNull(gateway.getSettings()); } else { assertNotNull(gateway.getSettings()); }
    public void testAllGateways() throws Exception {        Collection factoryIds = m_context.getFactoryIds().keySet();        for (Iterator i = factoryIds.iterator(); i.hasNext();) {            String factoryId = (String) i.next();            Gateway gateway = m_context.newGateway(factoryId);            assertEquals(gateway.getClass(), m_appContext.getBean(factoryId).getClass());            assertNotNull(gateway.getModelFilesContext());            m_context.storeGateway(gateway);        }        ITable actual = TestHelper.getConnection().createDataSet().getTable("gateway");        // one gateway per row        assertEquals(factoryIds.size(), actual.getRowCount());    }