Exemple #1
0
        public void Test_NotEqualsNull()
        {
            UIGridColumn uiGridColumn1 = new UIGridColumn("", "", "", "", false, 0, PropAlignment.centre, null);
            UIGridColumn uiGridColumn2 = null;

            Assert.IsFalse(uiGridColumn1 == uiGridColumn2);
            Assert.IsTrue(uiGridColumn1 != uiGridColumn2);
            Assert.IsFalse(uiGridColumn1.Equals(uiGridColumn2));
            Assert.AreNotEqual(uiGridColumn1, uiGridColumn2);
        }
Exemple #2
0
        public void Test_HashCodeNotEquals()
        {
            //---------------Set up test pack-------------------
            UIGridColumn gridColumn  = new UIGridColumn("pp", "pp", "", "", false, 0, PropAlignment.centre, null);
            UIGridColumn otherColumn = new UIGridColumn("pp", "qq", "", "", false, 0, PropAlignment.centre, null);

            //---------------Assert preconditions----------------
            Assert.IsFalse(gridColumn.Equals(otherColumn));
            //---------------Execute Test ----------------------
            //---------------Test Result -----------------------
            Assert.AreNotEqual(gridColumn.GetHashCode(), otherColumn.GetHashCode());
        }
Exemple #3
0
        public void Test_HashCodeEquals()
        {
            //---------------Set up test pack-------------------
            UIGridColumn  gridColumn       = new UIGridColumn("pp", "pp", "", "", false, 0, PropAlignment.centre, null);
            IUIGridColumn clonedGridColumn = gridColumn.Clone();

            //---------------Assert preconditions----------------
            Assert.IsTrue(gridColumn.Equals(clonedGridColumn));
            //---------------Execute Test ----------------------
            //---------------Test Result -----------------------
            Assert.AreEqual(gridColumn.GetHashCode(), clonedGridColumn.GetHashCode());
        }
Exemple #4
0
        public void Test_NotSameType()
        {
            //---------------Set up test pack-------------------
            UIGridColumn gridColumn = new UIGridColumn("", "", "", "", false, 0, PropAlignment.centre, null);
            //--------------Assert PreConditions----------------

            //---------------Execute Test ----------------------
            bool methodEquals = gridColumn.Equals("fedafds");

            //---------------Test Result -----------------------
            Assert.IsFalse(methodEquals);
            //---------------Tear Down -------------------------
        }
Exemple #5
0
        public void TestCloneGridColumn()
        {
            //---------------Set up test pack-------------------
            UIGridColumn gridColumn = new UIGridColumn("pp", "pp", "", "", false, 0, PropAlignment.centre, null);

            //---------------Execute Test ----------------------
            IUIGridColumn clonedGridColumn = gridColumn.Clone();

            //---------------Test Result -----------------------
            Assert.IsTrue(gridColumn.Equals(clonedGridColumn));
            Assert.IsTrue(gridColumn == (UIGridColumn)clonedGridColumn);
            Assert.IsFalse(gridColumn != (UIGridColumn)clonedGridColumn);
        }
Exemple #6
0
        public void Test_NotEqual_Heading()
        {
            //---------------Set up test pack-------------------
            UIGridColumn gridColumn1 = new UIGridColumn("pp", "pp", "", "", false, 0, PropAlignment.centre, null);
            UIGridColumn gridColumn2 = new UIGridColumn("pp1", "pp", "", "", false, 0, PropAlignment.centre, null);

            //--------------Assert PreConditions----------------

            //---------------Execute Test ----------------------
            bool operatorEquals    = gridColumn1 == gridColumn2;
            bool operatorNotEquals = gridColumn1 != gridColumn2;
            bool methodEquals      = gridColumn1.Equals(gridColumn2);

            //---------------Test Result -----------------------
            Assert.IsFalse(methodEquals);
            Assert.IsFalse(operatorEquals);
            Assert.IsTrue(operatorNotEquals);
            //---------------Tear Down -------------------------
        }