Example #1
0
        public void TestAddCondFormatAfterDataValidation_bug46547()
        {
            // Create a sheet with data validity (similar to bugzilla attachment id=23131).
            InternalSheet sheet = InternalSheet.CreateSheet();

            sheet.GetOrCreateDataValidityTable();

            ConditionalFormattingTable cft;

            // attempt to Add conditional formatting
            try
            {
                cft = sheet.ConditionalFormattingTable; // lazy getter
            }
            catch (InvalidCastException)
            {
                throw new AssertionException("Identified bug 46547b");
            }
            Assert.IsNotNull(cft);
        }