Beispiel #1
0
        public void TestToString_AllValuesInitialized()
        {
            var model = new SorterBindingModel
            {
                Direction = SortDirection.Ascending.Value,
                Property  = "S"
            };

            Assert.IsNotNull(model.ToString());
        }
Beispiel #2
0
        public void TestToString_AllValuesNull()
        {
            var model = new SorterBindingModel
            {
                Direction = null,
                Property  = null
            };

            Assert.IsNotNull(model.ToString());
        }
Beispiel #3
0
        public void TestToISorter()
        {
            var model = new SorterBindingModel
            {
                Direction = SortDirection.Ascending.Value,
                Property  = "S"
            };
            var iSorter = model.ToISorter();

            Assert.IsInstanceOfType(iSorter, typeof(SimpleSorter));
            var simpleSorter = (SimpleSorter)iSorter;

            Assert.AreEqual(model.Direction, simpleSorter.Direction);
            Assert.AreEqual(model.Property, simpleSorter.Property);
        }