Package org.apache.click

Examples of org.apache.click.MockContainer.stop()


        ConfigService config = ClickUtils.getConfigService(container.getServletContext());

        assertTrue(config.getTemplateService() instanceof VelocityTemplateService);

        container.stop();
        deleteDir(tmpdir);
    }

    public void testFileUploadService() throws Exception {
        File tmpdir = makeTmpDir();
View Full Code Here


        ConfigService config = ClickUtils.getConfigService(container.getServletContext());

        assertTrue(config.getFileUploadService() instanceof CommonsFileUploadService);

        container.stop();
        deleteDir(tmpdir);
    }

    public void testMessagesMapService() throws Exception {
        File tmpdir = makeTmpDir();
View Full Code Here

        ConfigService config = ClickUtils.getConfigService(container.getServletContext());

        assertTrue(config.getMessagesMapService() instanceof MyMessagesMapService);

        container.stop();
        deleteDir(tmpdir);
    }

    static public class MyMessagesMapService implements MessagesMapService {
View Full Code Here

        field.getFileItem().getName();
        assertEquals(fieldName, field.getFileItem().getFieldName());
        assertEquals(fileName, field.getFileItem().getName());
        assertEquals(file.length(), field.getFileItem().getSize());

        container.stop();

        } catch (Exception e) {
            e.printStackTrace();
            fail();
        }
View Full Code Here

        Assert.assertEquals("value1", entry.getValue());

        Assert.assertEquals(1, sm.values().size());
        Assert.assertTrue(sm.values().contains("value1"));

        container.stop();
    }

    /**
     * Test changes to the SessionMap.
     */
 
View Full Code Here

        sm.clear();
       
        Assert.assertEquals(0, sm.size());
       
        container.stop();
    }
   
    /**
     * Test iteration over entrySet from velocity.
     */
 
View Full Code Here

        container.getRequest().setMethod("GET");

        container.testPage(SessionMapPage.class);
        Assert.assertTrue(container.getHtml().contains("attrib1=value1"));
       
        container.stop();
    }
}
View Full Code Here

        pstr.close();

        MockContainer container = new MockContainer(tmpdir.getAbsolutePath());
        container.start();

        container.stop();

        deleteDir(tmpdir);
    }

    static public class MyControl extends AbstractControl {
View Full Code Here

        List<PageInterceptor> list = config.getPageInterceptors();
        assertEquals(2, list.size());
        assertEquals("std", list.get(0).toString());
        assertEquals("app", list.get(1).toString());
        container.stop();

        deleteDir(tmpdir);
    }

View Full Code Here

        // Check that the title attribute was rendered
        assertEquals(1, StringUtils.countMatches(pickListStr, "title=\"test\""));

        // Check that class attribute was rendered once
        assertEquals(1, StringUtils.countMatches(pickListStr, "class="));
        container.stop();
    }

    /**
     * Test that PickList.getState contains all the selected values.
     * CLK-715
 
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.