Example #1
0
        public void TestGroupies()
        {
            IList <OLVColumn> columns = Generator.GenerateColumns(typeof(GeneratorTestModelGroupies));

            Assert.AreEqual(1, columns.Count);
            GeneratorTestModelGroupies model = new GeneratorTestModelGroupies();

            model.OLVGroupy = 5;
            Assert.AreEqual(0, columns[0].GetGroupKey(model));
            model.OLVGroupy = 35;
            Assert.AreEqual(3, columns[0].GetGroupKey(model));
            Assert.AreEqual("Above thirty", columns[0].ConvertGroupKeyToTitle(3));
        }
 public void TestGroupies() {
     IList<OLVColumn> columns = Generator.GenerateColumns(typeof(GeneratorTestModelGroupies));
     Assert.AreEqual(1, columns.Count);
     GeneratorTestModelGroupies model = new GeneratorTestModelGroupies();
     model.OLVGroupy = 5;
     Assert.AreEqual(0, columns[0].GetGroupKey(model));
     model.OLVGroupy = 35;
     Assert.AreEqual(3, columns[0].GetGroupKey(model));
     Assert.AreEqual("Above thirty", columns[0].ConvertGroupKeyToTitle(3));
 }