Examples of GaeVelocityUtils


Examples of com.cedarsolutions.util.gae.GaeVelocityUtils

    @Test public void testConstructor() {
        GaeVelocityTemplateService service = new GaeVelocityTemplateService();
        assertNull(service.getGaeVelocityUtils());
        assertNull(service.getTemplateDirResource());

        GaeVelocityUtils gaeVelocityUtils = mock(GaeVelocityUtils.class);
        service.setGaeVelocityUtils(gaeVelocityUtils);
        assertSame(gaeVelocityUtils, service.getGaeVelocityUtils());

        Resource templateDirResource = mock(Resource.class);
        service.setTemplateDirResource(templateDirResource);
View Full Code Here

Examples of com.cedarsolutions.util.gae.GaeVelocityUtils

    }

    /** Test the afterPropertiesSet() method. */
    @Test public void testAfterPropertiesSet() throws Exception {
        GaeVelocityTemplateService service = new GaeVelocityTemplateService();
        GaeVelocityUtils gaeVelocityUtils = mock(GaeVelocityUtils.class);
        Resource templateDirResource = mock(Resource.class, RETURNS_DEEP_STUBS);   // so call1().call2().call3() works

        try {
            service.setGaeVelocityUtils(null);
            service.setTemplateDirResource(templateDirResource);
View Full Code Here

Examples of com.cedarsolutions.util.gae.GaeVelocityUtils

    }

    /** Create a service instance properly stubbed for testing. */
    private static GaeVelocityTemplateService createService() throws Exception {
        GaeVelocityTemplateService service = new GaeVelocityTemplateService();
        GaeVelocityUtils gaeVelocityUtils = GaeVelocityUtils.getInstance();
        Resource templateDirResource = mock(Resource.class, RETURNS_DEEP_STUBS);   // so call1().call2().call3() works

        when(templateDirResource.exists()).thenReturn(true);
        when(templateDirResource.getFile().getPath()).thenReturn(TEMPLATE_DIR);

View Full Code Here

Examples of com.cedarsolutions.util.gae.GaeVelocityUtils

     * @return Partially-mocked email service that can be used for testing.
     */
    public static IEmailService createPartiallyMockedEmailService(String templateDir) {
        try {
            GaeEmailUtils gaeEmailUtils = mock(GaeEmailUtils.class);
            GaeVelocityUtils gaeVelocityUtils = GaeVelocityUtils.getInstance();

            Resource templateDirResource = mock(Resource.class, RETURNS_DEEP_STUBS);
            when(templateDirResource.exists()).thenReturn(true);
            when(templateDirResource.getFile().getPath()).thenReturn(templateDir);

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.