Beispiel #1
0
        public void AssignStyleNameParentTest_Parents()
        {
            // Arrange
            Split split = new Split();

            split.DisplayCols.Add(new C1DisplayColumn());
            int count = 0;

            // Act
            split.AssignStyleNameParent(ref count);
            bool actualResult = split.Styles["CaptionStyle"].Parent.Equals(split.Styles["HeadingStyle"].Name);

            // Assert
            Assert.IsTrue(actualResult);
        }
        public void AssignStyleNameParentTest_Parents()
        {
            // Arrange
            Split           split   = new Split();
            C1DisplayColumn dispCol = new C1DisplayColumn();

            split.DisplayCols.Add(dispCol);
            int count = 0;

            // Act
            split.AssignStyleNameParent(ref count);
            bool actualResult = dispCol.Styles["HeadingStyle"].Parent.Equals(split.Styles["HeadingStyle"].Name) &&
                                dispCol.Styles["ColumnSelectorStyle"].Parent.Equals(split.Styles["ColumnSelectorStyle"].Name) &&
                                dispCol.Styles["Style"].Parent.Equals(split.Styles["Style"].Name) &&
                                dispCol.Styles["FooterStyle"].Parent.Equals(split.Styles["FooterStyle"].Name) &&
                                dispCol.Styles["EditorStyle"].Parent.Equals(split.Styles["EditorStyle"].Name) &&
                                dispCol.Styles["GroupHeaderStyle"].Parent.Equals(split.Styles["Style"].Name) &&
                                dispCol.Styles["GroupFooterStyle"].Parent.Equals(split.Styles["Style"].Name);

            // Assert
            Assert.IsTrue(actualResult);
        }