Package net.emaze.dysfunctional.dispatching.delegates

Examples of net.emaze.dysfunctional.dispatching.delegates.BinaryDelegate.perform()


    @Test(expected = ClassCastException.class)
    public void callingErasureWithWrongTypeYieldsException() {
        Comparator<Integer> comp = new ComparableComparator<Integer>();
        BinaryDelegate d = new MakeOrder<Integer>(comp);
        d.perform(new Object(), new Object());
    }

    @Test
    public void canOrderComparablesWhenLhsIsLesser() {
        Comparator<Integer> comp = new ComparableComparator<Integer>();
View Full Code Here


    }

    @Test// you probably expect this (expected = ClassCastException.class)
    public void passingWrongTypeToErasureJustForwardsToTheNestedAction() {
        final BinaryDelegate d = new BinaryPredicateToBinaryDelegate<O, O>(new BinaryAlways<O, O>());
        d.perform(new Object(), new Object());
    }

    @Test
    public void adapterCorrectlyPassesFirstParamToAdapted() {
        final Box<O> param1 = Box.empty();
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.