Esempio n. 1
0
        public void WhenViewsWithSortHintsAdded_RegionSortsViews()
        {
            IRegion region = new Region();

            object view1 = new ViewOrder1();
            object view2 = new ViewOrder2();
            object view3 = new ViewOrder3();

            region.Add(view1);
            region.Add(view2);
            region.Add(view3);

            Assert.Equal(3, region.Views.Count());
            Assert.Same(view2, region.Views.ElementAt(0));
            Assert.Same(view3, region.Views.ElementAt(1));
            Assert.Same(view1, region.Views.ElementAt(2));
        }
        public void WhenViewsWithSortHintsAdded_RegionSortsViews()
        {
            IRegion region = new Region();

            object view1 = new ViewOrder1();
            object view2 = new ViewOrder2();
            object view3 = new ViewOrder3();

            region.Add(view1);
            region.Add(view2);
            region.Add(view3);

            Assert.AreEqual(3, region.Views.Count());
            Assert.AreSame(view2, region.Views.ElementAt(0));
            Assert.AreSame(view3, region.Views.ElementAt(1));
            Assert.AreSame(view1, region.Views.ElementAt(2));
        }