Exemplo n.º 1
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());
        }
Exemplo n.º 2
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);
        }
Exemplo n.º 3
0
        public void Test_EqualHasCopyOfGridColumn()
        {
            //---------------Set up test pack-------------------
            UIGrid       uiGrid       = new UIGrid();
            UIGridColumn uiGridColumn = GetUiGridColumn();

            uiGrid.Add(uiGridColumn);
            //--------------Assert PreConditions----------------

            //---------------Execute Test ----------------------
            UIGrid uiGrid2 = new UIGrid();

            uiGrid2.Add(uiGridColumn.Clone());
            //---------------Test Result -----------------------
            Assert.IsTrue(uiGrid.Equals(uiGrid2));
            Assert.IsTrue(uiGrid == uiGrid2);
            Assert.IsFalse(uiGrid != uiGrid2);
            //---------------Tear Down -------------------------
        }