Package org.nxplanner.easymock

Examples of org.nxplanner.easymock.BeanArgumentMatcher


        domainObject.setName("PROJECT_NAME");
        mockSessionControl.expectAndReturn(mockSession.load(Project.class, new Integer(OID)), domainObject);
        HistoricalEvent event = new HistoricalEvent(0, 0, "project",
                HistoricalEvent.DELETED, "PROJECT_NAME", XPlannerTestSupport.DEFAULT_PERSON_ID, new Date());
        mockSession.save(event);
        mockSessionControl.setMatcher(new BeanArgumentMatcher(null, new String[]{"when"}));
        mockSessionControl.setReturnValue(new Integer(OID+1));
        mockSession.find("", null, Hibernate.INTEGER);
        mockSessionControl.setMatcher(MockControl.ALWAYS_MATCHER);
        mockSessionControl.setReturnValue(Collections.EMPTY_LIST);
        mockObjectRepository.delete(OID);
View Full Code Here


    public void testInsertHistory() throws Exception {
        HistoricalEvent event = new HistoricalEvent(0, 0, "project",
                HistoricalEvent.CREATED, null, XPlannerTestSupport.DEFAULT_PERSON_ID, new Date());
        mockSession.save(event);
        mockSessionControl.setMatcher(new BeanArgumentMatcher(null, new String[]{"when"}));
        mockSessionControl.setReturnValue(new Integer(OID+1));
        mockObjectRepositoryControl.expectAndReturn(mockObjectRepository.insert(domainObject), 111);
        replay();

        adapter.insert(domainObject);
View Full Code Here

    public void testUpdateHistory() throws Exception {
        HistoricalEvent event = new HistoricalEvent(0, 0, "project",
                HistoricalEvent.UPDATED, null, XPlannerTestSupport.DEFAULT_PERSON_ID, new Date());
        mockSession.save(event);
        mockSessionControl.setMatcher(new BeanArgumentMatcher(null, new String[]{"when"}));
        mockSessionControl.setReturnValue(new Integer(OID+1));
        mockSession.createQuery("placeholder");
        mockSessionControl.setMatcher(MockControl.ALWAYS_MATCHER);
        mockSessionControl.setReturnValue(mockQuery);
        mockObjectRepository.update(domainObject);
View Full Code Here

TOP

Related Classes of org.nxplanner.easymock.BeanArgumentMatcher

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.