Package org.apache.tapestry5.services

Examples of org.apache.tapestry5.services.ResourceDigestGenerator


    @Test
    public void caching_and_invalidation() throws Exception
    {
        // Alas, mixing and matching live code with mocks
        ResourceDigestGenerator generator = mockResourceDigestGenerator();
        InvalidationListener listener = mockInvalidationListener();
        File f = createTestFile();
        URL url = f.toURL();
        Resource r = mockResource();
View Full Code Here


    private final ClasspathURLConverter converter = new ClasspathURLConverterImpl();

    @Test
    public void properties_for_simple_resource() throws Exception
    {
        ResourceDigestGenerator generator = mockResourceDigestGenerator();

        File f = createTestFile();
        URL url = f.toURL();
        Resource r = mockResource();
View Full Code Here

    }

    @Test
    public void properties_for_missing_resource() throws Exception
    {
        ResourceDigestGenerator generator = mockResourceDigestGenerator();

        Resource r = mockResource();

        train_getPath(r, PATH);
        train_toURL(r, null);
View Full Code Here

    }

    @Test
    public void properties_for_protected_resource() throws Exception
    {
        ResourceDigestGenerator generator = mockResourceDigestGenerator();

        File f = createTestFile();
        URL url = f.toURL();
        Resource r = mockResource();
View Full Code Here

    }

    @Test
    public void caching_and_invalidation() throws Exception
    {
        ResourceDigestGenerator generator = mockResourceDigestGenerator();
        InvalidationListener listener = mockInvalidationListener();
        File f = createTestFile();
        URL url = f.toURL();
        Resource r = mockResource();
View Full Code Here

    @Test
    public void typical_file() throws Exception
    {
        URL url = getClass().getResource("ResourceDigestGeneratorImplTest.class");

        ResourceDigestGenerator g = new ResourceDigestGeneratorImpl(Arrays.asList("class"));

        String digest = g.generateDigest(url);

        assertTrue(digest.length() > 0);

        String checksum2 = g.generateDigest(url);

        assertEquals(checksum2, digest);
    }
View Full Code Here

    private static final String DIGEST = "abc123";

    @Test
    public void properties_for_simple_resource() throws Exception
    {
        ResourceDigestGenerator generator = mockResourceDigestGenerator();

        File f = createTestFile();
        URL url = f.toURL();
        Resource r = mockResource();
View Full Code Here

    }

    @Test
    public void properties_for_missing_resource() throws Exception
    {
        ResourceDigestGenerator generator = mockResourceDigestGenerator();

        Resource r = mockResource();

        train_getPath(r, PATH);
        train_toURL(r, null);
View Full Code Here

    }

    @Test
    public void properties_for_protected_resource() throws Exception
    {
        ResourceDigestGenerator generator = mockResourceDigestGenerator();

        File f = createTestFile();
        URL url = f.toURL();
        Resource r = mockResource();
View Full Code Here

    }

    @Test
    public void caching_and_invalidation() throws Exception
    {
        ResourceDigestGenerator generator = mockResourceDigestGenerator();
        InvalidationListener listener = mockInvalidationListener();
        File f = createTestFile();
        URL url = f.toURL();
        Resource r = mockResource();
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.services.ResourceDigestGenerator

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.