Package org.jmock

Examples of org.jmock.Mockery.assertIsSatisfied()


        });

        AppModule module = new TestFixture().getAppModule("emptyrelationship-ejb-jar.xml", null);
        new EntityBeanPojoConverter(facade).convert(module);

        context.assertIsSatisfied();

    }
}
View Full Code Here


        });

        AppModule module = new TestFixture().getAppModule("single-session-bean.xml", null);
        new SessionBeanRemoteAnnotationAdder(facade).convert(module);

        context.assertIsSatisfied();
    }

    public void testNotShouldAddRemoteAndRemoteHomeAnnotationsForLocalBeans() throws Exception {
        Mockery context = new Mockery();
        final IJDTFacade facade = context.mock(IJDTFacade.class);
View Full Code Here

        final IJDTFacade facade = context.mock(IJDTFacade.class);

        AppModule module = new TestFixture().getAppModule("single-session-bean-local.xml", null);
        new SessionBeanRemoteAnnotationAdder(facade).convert(module);

        context.assertIsSatisfied();
    }

    public void testNotShouldAddRemoteAndRemoteHomeAnnotationsForBadSessionBean() throws Exception {
        Mockery context = new Mockery();
        final IJDTFacade facade = context.mock(IJDTFacade.class);
View Full Code Here

        final IJDTFacade facade = context.mock(IJDTFacade.class);

        AppModule module = new TestFixture().getAppModule("badsession-ejb-jar.xml", null);
        new SessionBeanRemoteAnnotationAdder(facade).convert(module);

        context.assertIsSatisfied();
    }

    public void testNotShouldAddRemoteAndRemoteHomeAnnotationsForEmptySessionBean() throws Exception {
        Mockery context = new Mockery();
        final IJDTFacade facade = context.mock(IJDTFacade.class);
View Full Code Here

        final IJDTFacade facade = context.mock(IJDTFacade.class);

        AppModule module = new TestFixture().getAppModule("emptysession-ejb-jar.xml", null);
        new SessionBeanRemoteAnnotationAdder(facade).convert(module);

        context.assertIsSatisfied();
    }
}
View Full Code Here

            public boolean isSatisified() throws Exception {
                LOG.info("broker state {}", broker);
                return broker.is("stopped").isActive();
            }
        }));
        context.assertIsSatisfied();

        assertTrue("no exceptions: " + exceptions, exceptions.isEmpty());
    }
}
View Full Code Here

        assertEquals(0, actualRes.getDoc().size());
        assertEquals("myPath", actualRes.getPath());
        assertEquals(0, actualRes.getParam().size());
        assertEquals(0, actualRes.getMethodOrResource().size());

        mockContext.assertIsSatisfied();
    }

    @Test
    public void testBuildResourceWithMock() throws Exception {
        WADLGenerator generator = new WADLGenerator();
View Full Code Here

        assertEquals(0, resps.get(0).getAny().size());
        assertEquals(0, resps.get(0).getDoc().size());
        assertEquals(0, resps.get(0).getOtherAttributes().size());
        assertEquals(0, resps.get(0).getParam().size());

        mockContext.assertIsSatisfied();
    }

    @Test
    public void testBuildBasicMethodMetadataWithMock() throws Exception {
        WADLGenerator generator = new WADLGenerator();
View Full Code Here

        assertEquals(0, resps.get(0).getAny().size());
        assertEquals(0, resps.get(0).getDoc().size());
        assertEquals(0, resps.get(0).getOtherAttributes().size());
        assertEquals(0, resps.get(0).getParam().size());

        mockContext.assertIsSatisfied();
    }

    @Test
    public void testBuildBasicRequestWithMock() {
        WADLGenerator generator = new WADLGenerator();
View Full Code Here

        Request r = generator.buildRequest(classMeta, metadata);
        /*
         * should be null otherwise a no-value request element might be added
         */
        assertNull(r);
        mockContext.assertIsSatisfied();
    }

    @Test
    public void testGenerate1Resource() throws Exception {
        WADLGenerator generator = new WADLGenerator();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.