Esempio n. 1
0
        public void TestOrder()
        {
            var test1 = new Test1();
            var afterTest1 = new AfterTest1();
            var beforeTest1 = new BeforeTest1();
            var afterBeforeTest1 = new AfterBeforeTest1();
            var unspecified = new Unspecified();

            var list = new List<object>() {afterBeforeTest1, test1, beforeTest1, afterTest1, unspecified};
            var sorted = ExecuteOrderSorter.Sort(list);

            sorted.Count.ShouldBe(list.Count);

            foreach (var o in sorted)
            {
                Console.WriteLine(o);
            }

            AssertOrder(beforeTest1, test1, sorted);
            AssertOrder(test1, afterTest1, sorted);
            AssertOrder(beforeTest1, afterBeforeTest1, sorted);
        }
Esempio n. 2
0
        public void TestOrder()
        {
            var test1            = new Test1();
            var afterTest1       = new AfterTest1();
            var beforeTest1      = new BeforeTest1();
            var afterBeforeTest1 = new AfterBeforeTest1();
            var unspecified      = new Unspecified();

            var list = new List <object> {
                afterBeforeTest1, test1, beforeTest1, afterTest1, unspecified
            };
            var sorted = ExecuteOrderSorter.Sort(list);

            sorted.Count.ShouldBe(list.Count);

            foreach (var o in sorted)
            {
                Console.WriteLine(o);
            }

            AssertOrder(beforeTest1, test1, sorted);
            AssertOrder(test1, afterTest1, sorted);
            AssertOrder(beforeTest1, afterBeforeTest1, sorted);
        }