Package net.emaze.dysfunctional.dispatching.actions

Examples of net.emaze.dysfunctional.dispatching.actions.BinaryAction


        Assert.assertTrue(duration >= expectedMillis);
    }

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


        action.perform(1l, new Object());
    }

    @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());
    }
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);
    }   
View Full Code Here

        Assert.assertEquals(ICE_AGE + 1, currentTimeInMillis);
    }

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

        action.perform(1l, new Object());
    }

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

TOP

Related Classes of net.emaze.dysfunctional.dispatching.actions.BinaryAction

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.