Package net.emaze.dysfunctional.dispatching.actions

Examples of net.emaze.dysfunctional.dispatching.actions.BinaryAction.perform()


    }

    @Test(expected = ClassCastException.class)
    public void passingWrongTypeForTimeUnitInErasureYieldsException() {
        BinaryAction action = sleeper;
        action.perform(1l, new Object());
    }

    @Test(expected = ClassCastException.class)
    public void passingWrongTypeForDurationInErasureYieldsException() {
        BinaryAction action = sleeper;
View Full Code Here


    }

    @Test(expected = ClassCastException.class)
    public void passingWrongTypeForDurationInErasureYieldsException() {
        BinaryAction action = sleeper;
        action.perform(new Object(), TimeUnit.MILLISECONDS);
    }
}
View Full Code Here

   
    @Test(expected = ClassCastException.class)
    public void passingWrongTypeForTimeUnitInErasureYieldsException() {
        final InterruptingEverySecondTimeStrategy interruptingStrategy = new InterruptingEverySecondTimeStrategy(0);
        BinaryAction action = new SleepAtLeast(interruptingStrategy);       
        action.perform(1l, new Object());
    }

    @Test(expected = ClassCastException.class)
    public void passingWrongTypeForDurationInErasureYieldsException() {
        final InterruptingEverySecondTimeStrategy interruptingStrategy = new InterruptingEverySecondTimeStrategy(0);
View Full Code Here

    @Test(expected = ClassCastException.class)
    public void passingWrongTypeForDurationInErasureYieldsException() {
        final InterruptingEverySecondTimeStrategy interruptingStrategy = new InterruptingEverySecondTimeStrategy(0);
        BinaryAction action = new SleepAtLeast(interruptingStrategy);       
        action.perform(new Object(), TimeUnit.MILLISECONDS);
    }   

    public static class InterruptingEverySecondTimeStrategy implements TimeStrategy {

        public long now;
View Full Code Here

    }

    @Test(expected = ClassCastException.class)
    public void passingWrongTypeForTimeUnitInErasureYieldsException() {
        BinaryAction action = new Sleep(clock);
        action.perform(1l, new Object());
    }

    @Test(expected = ClassCastException.class)
    public void passingWrongTypeForDurationInErasureYieldsException() {
        BinaryAction action = new Sleep(clock);
View Full Code Here

    }

    @Test(expected = ClassCastException.class)
    public void passingWrongTypeForDurationInErasureYieldsException() {
        BinaryAction action = new Sleep(clock);
        action.perform(new Object(), TimeUnit.MILLISECONDS);
    }
}
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.