Package org.jetlang.core

Examples of org.jetlang.core.SynchronousDisposingExecutor


    @Test
    public void shouldHandleExtendedInterfaces() {
        LabMouse subscription = mock(LabMouse.class);

        Protocol<LabMouse> protocol = Protocol.create(LabMouse.class);
        protocol.subscribe(new SynchronousDisposingExecutor(), subscription);
        protocol.publisher().runThroughMaze();
        protocol.publisher().eatCheese("reward");

        verify(subscription).runThroughMaze();
        verify(subscription).eatCheese("reward");
View Full Code Here


    @Test
    public void shouldCreatePublisherForInterfaceThatHasSuperInterfacesWithClashingSignatures() throws Exception {
        Protocol<AB> protocol = Protocol.create(AB.class);
        AB mock = mock(AB.class);
        protocol.subscribe(new SynchronousDisposingExecutor(), mock);

        protocol.publisher().something("cheddar");
        verify(mock).something("cheddar");
    }
View Full Code Here

    @Test
    public void shouldCreatePublisherForClassesWithMethodOverloading() throws Exception {
        Protocol<Overloaded> protocol = Protocol.create(Overloaded.class);
        Overloaded mock = mock(Overloaded.class);
        protocol.subscribe(new SynchronousDisposingExecutor(), mock);

        protocol.publisher().doSomething("cheddar");
        verify(mock).doSomething("cheddar");

        protocol.publisher().doSomething("cheddar", "beer");
View Full Code Here

TOP

Related Classes of org.jetlang.core.SynchronousDisposingExecutor

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.