Пример #1
0
        public void ItemIndexViewModel_SortDataSet_Default_Should_Pass()
        {
            // Arrange

            // Add items into the list Z ordered
            var dataList = new List <ItemModel>
            {
                new ItemModel {
                    Name = "z"
                },
                new ItemModel {
                    Name = "m"
                },
                new ItemModel {
                    Name = "a"
                }
            };

            // Act
            var result = ViewModel.SortDataset(dataList);

            // Reset

            // Assert
            Assert.AreEqual("a", result[0].Name);
            Assert.AreEqual("m", result[1].Name);
            Assert.AreEqual("z", result[2].Name);
        }