Package com.philip.journal.home.dao

Examples of com.philip.journal.home.dao.ConfigItemDAO


        getSession().put(BusinessServiceProxy.SERVICE_FACADE, mockedFacade);

        final BranchDAO mockBranchDAO = mock(BranchDAO.class);
        final EntryDAO mockEntryDAO = mock(EntryDAO.class);
        final UserDAO mockUserDAO = mock(UserDAO.class);
        final ConfigItemDAO mockConfigDAO = mock(ConfigItemDAO.class);

        when(daoFacade.getConfigItemDAO()).thenReturn(mockConfigDAO);
        when(mockConfigDAO.readAll()).thenReturn(new ArrayList<ConfigItem>());

        when(daoFacade.getBranchDAO()).thenReturn(mockBranchDAO);
        testRootBranch = new Branch(Constant.ROOT_NAME, null); //mock(Branch.class);
        testRootBranch.setBranchId(Constant.ROOT_ID);
        when(mockBranchDAO.read(Constant.ROOT_ID)).thenReturn(testRootBranch);
View Full Code Here


        testConfig11 = new ConfigItem(null, null, null);
        testConfig11.setConfigId(TEST_CONFIG11_ID);
        testConfig11.setParent(testConfig1);

        final ConfigItemDAO mockConfigDAO = getDaoFacade().getConfigItemDAO();
        final List<ConfigItem> allConfig = new ArrayList<ConfigItem>();
        allConfig.add(testConfig1);
        allConfig.add(testConfig2);
        allConfig.add(testConfig11);

        parentChildrenMap = new HashMap<Long, List<ConfigItem>>();
        final List<ConfigItem> configList11 = new ArrayList<ConfigItem>();
        configList11.add(testConfig11);
        parentChildrenMap.put(TEST_CONFIG1_ID, configList11);
        when(mockConfigDAO.readAll()).thenReturn(allConfig);
    }
View Full Code Here

TOP

Related Classes of com.philip.journal.home.dao.ConfigItemDAO

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.