Exemplo n.º 1
0
        [Test] public void MergeListAndStateColumnFlags()
        {
            ColumnDescriptor  listColumn  = new ColumnDescriptor("Date", 50);
            ColumnDescriptor  stateColumn = new ColumnDescriptor("Date", 50, ColumnDescriptorFlags.ShowIfNotEmpty);
            ResourceListState state       = new ResourceListState(new ColumnDescriptor[] { stateColumn }, null, true);

            ColumnDescriptor[] result = _displayColumnManager.UpdateColumnsFromState(new ColumnDescriptor[] { listColumn },
                                                                                     state);
            Assert.AreEqual(1, result.Length);
            Assert.AreEqual(ColumnDescriptorFlags.ShowIfNotEmpty, result [0].Flags);
        }
Exemplo n.º 2
0
        [Test] public void MergeListAndStateColumnHidden()
        {
            ColumnDescriptor listSubjectColumn  = new ColumnDescriptor("Subject", 100);
            ColumnDescriptor stateSubjectColumn = new ColumnDescriptor("Subject", 100);
            ColumnDescriptor stateDateColumn    = new ColumnDescriptor("Date", 50, ColumnDescriptorFlags.ShowIfNotEmpty);

            ResourceListState state = new ResourceListState(
                new ColumnDescriptor[] { stateSubjectColumn, stateDateColumn }, null, true);

            ColumnDescriptor[] result = _displayColumnManager.UpdateColumnsFromState(new ColumnDescriptor[] { listSubjectColumn },
                                                                                     state);
            Assert.AreEqual(2, result.Length);
            Assert.AreEqual("Subject", result [0].PropNames [0]);
            Assert.AreEqual("Date", result [1].PropNames [0]);
        }