Package org.milyn.delivery.ordering.testvisitors

Examples of org.milyn.delivery.ordering.testvisitors.TestConsumer


        sortList.clear();
        originalList.clear();
    }

    public void test_sort_01_producer_first() {
        addVisitor(new TestConsumer("e", "f"));
        addVisitor(new TestProducerConsumer().setProducts("h").setConsumes("g"));
        addVisitor(new TestProducer("a", "b", "c"));
        addVisitor(new TestVisitor());
        addVisitor(new TestConsumer("d", "g"));
        addVisitor(new TestProducer("d", "e"));
        addVisitor(new TestConsumer("b"));
        addVisitor(new TestVisitor());
        addVisitor(new TestProducerConsumer().setProducts("g").setConsumes("c"));

        Sorter.sort(sortList, Sorter.SortOrder.PRODUCERS_FIRST);
        assertEquals(originalList.get(5), sortList.get(0));
View Full Code Here


        assertEquals(originalList.get(6), sortList.get(8));
    }

    public void test_sort_02_producer_first() {
        addVisitor(new TestProducerConsumer().setProducts("h").setConsumes("g"));
        addVisitor(new TestConsumer("e", "f"));
        addVisitor(new TestConsumer("b"));
        addVisitor(new TestProducer("d", "e"));
        addVisitor(new TestProducerConsumer().setProducts("g").setConsumes("c"));
        addVisitor(new TestConsumer("d", "g"));
        addVisitor(new TestVisitor());
        addVisitor(new TestVisitor());
        addVisitor(new TestProducer("a", "b", "c"));

        Sorter.sort(sortList, Sorter.SortOrder.PRODUCERS_FIRST);
View Full Code Here

        assertEquals(originalList.get(5), sortList.get(8));
    }

    public void test_sort_01_consumers_first() {
        addVisitor(new TestProducerConsumer().setProducts("h").setConsumes("g"));
        addVisitor(new TestConsumer("e", "f"));
        addVisitor(new TestConsumer("b"));
        addVisitor(new TestProducer("d", "e"));
        addVisitor(new TestProducerConsumer().setProducts("g").setConsumes("c"));
        addVisitor(new TestConsumer("d", "g"));
        addVisitor(new TestVisitor());
        addVisitor(new TestVisitor());
        addVisitor(new TestProducer("a", "b", "c"));

        Sorter.sort(sortList, Sorter.SortOrder.CONSUMERS_FIRST);
View Full Code Here

TOP

Related Classes of org.milyn.delivery.ordering.testvisitors.TestConsumer

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.