Package org.apache.hivemind

Examples of org.apache.hivemind.ErrorLog


        return cycle;
    }

    public void testNoEncoders()
    {
        ErrorLog log = newErrorLog();
        WebRequest request = newRequest();
        IRequestCycle cycle = newCycle();

        replayControls();
View Full Code Here


        assertEquals("/context/app?service=myservice", link.getURL());
    }

    public void testStatefulRequest()
    {
        ErrorLog log = newErrorLog();
        WebRequest request = newRequest();
        MockControl enginec = newControl(IEngine.class);
        IEngine engine = (IEngine) enginec.getMock();

        MockControl cyclec = newControl(IRequestCycle.class);
View Full Code Here

    public void testNoopEncoders()
    {
        WebRequest request = newRequest();
        IRequestCycle cycle = newCycle();
        ErrorLog log = newErrorLog();

        replayControls();

        List l = new ArrayList();
        l.add(newContribution("fred", new NoopEncoder()));
View Full Code Here

    public void testActiveEncoder()
    {
        WebRequest request = newRequest();
        IRequestCycle cycle = newCycle();
        ErrorLog log = newErrorLog();

        replayControls();
        PageServiceEncoder e = new PageServiceEncoder();
        e.setServiceName("page");
        e.setExtension("html");
View Full Code Here

    public void testWithServiceParameters()
    {
        WebRequest request = newRequest();
        IRequestCycle cycle = newCycle();
        ErrorLog log = newErrorLog();

        replayControls();

        PageServiceEncoder e = new PageServiceEncoder();
        e.setServiceName("external");
View Full Code Here

    }

    public void testGetChanges()
    {
        IRequestCycle cycle = newCycle();
        ErrorLog log = newLog();

        MockControl sourcec = newControl(PropertyPersistenceStrategySource.class);
        PropertyPersistenceStrategySource source = (PropertyPersistenceStrategySource) sourcec
                .getMock();
View Full Code Here

    }

    public void testObserveChange()
    {
        IRequestCycle cycle = newCycle();
        ErrorLog log = newLog();

        MockControl pagec = newControl(IPage.class);
        IPage page = (IPage) pagec.getMock();

        IComponentSpecification spec = newSpec("foobar", "session");
View Full Code Here

    public void testUnknownStategy()
    {
        Location l = fabricateLocation(12);
        Throwable inner = new ApplicationRuntimeException("Simulated error.");
        ErrorLog log = newLog();

        IRequestCycle cycle = newCycle();

        MockControl sourcec = newControl(PropertyPersistenceStrategySource.class);
        PropertyPersistenceStrategySource source = (PropertyPersistenceStrategySource) sourcec
                .getMock();

        MockControl componentc = newControl(IComponent.class);
        IComponent component = (IComponent) componentc.getMock();

        MockControl specc = newControl(IComponentSpecification.class);
        IComponentSpecification spec = (IComponentSpecification) specc.getMock();

        MockControl psc = newControl(IPropertySpecification.class);
        IPropertySpecification ps = (IPropertySpecification) psc.getMock();

        component.getSpecification();
        componentc.setReturnValue(spec);

        spec.getPropertySpecification("zip");
        specc.setReturnValue(ps);

        ps.getPersistence();
        psc.setReturnValue("unknown");

        source.getStrategy("unknown");
        sourcec.setThrowable(inner);

        ps.getLocation();
        psc.setReturnValue(l);

        log.error("Simulated error.", l, inner);

        replayControls();

        PageRecorderImpl pr = new PageRecorderImpl("SomePage", cycle, source, log);
View Full Code Here

    }

    public void testRollbackPageProperty()
    {
        IRequestCycle cycle = newCycle();
        ErrorLog log = newLog();

        Creator creator = new Creator();

        PageFixture page = (PageFixture) creator.newInstance(PageFixture.class);
View Full Code Here

    }

    public void testRollbackComponentProperty()
    {
        IRequestCycle cycle = newCycle();
        ErrorLog log = newLog();

        MockControl pagec = newControl(IPage.class);
        IPage page = (IPage) pagec.getMock();

        IComponent component = (IComponent) newMock(IComponent.class);
View Full Code Here

TOP

Related Classes of org.apache.hivemind.ErrorLog

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.