当前位置: 首页>>代码示例>>C#>>正文


C# UIGrid.Equals方法代码示例

本文整理汇总了C#中UIGrid.Equals方法的典型用法代码示例。如果您正苦于以下问题:C# UIGrid.Equals方法的具体用法?C# UIGrid.Equals怎么用?C# UIGrid.Equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UIGrid的用法示例。


在下文中一共展示了UIGrid.Equals方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TestCloneUIGrid

        public void TestCloneUIGrid()
        {
            UIGridColumn uiGridCol = new UIGridColumn("Head", "Prop", "control", "Assembly",true,100, PropAlignment.centre, null);
            UIGrid uiGrid = new UIGrid();
            uiGrid.SortColumn = "Prop";
            uiGrid.Add(uiGridCol);

            //---------------Execute Test ----------------------
            IUIGrid clonedGrid = uiGrid.Clone();

            //---------------Test Result -----------------------
            Assert.IsTrue(uiGrid.Equals(clonedGrid));
            Assert.IsTrue(uiGrid == (UIGrid) clonedGrid);
            Assert.IsFalse(uiGrid != (UIGrid) clonedGrid);
            Assert.AreEqual(uiGrid[0], clonedGrid[0],
                              "Should be a deep copy and the columns should be equal but copied");
            Assert.AreNotSame(uiGrid[0], clonedGrid[0], "Should be a deep copy and the columns should be equal but copied (not same)");
        }
开发者ID:kevinbosman,项目名称:habanero,代码行数:18,代码来源:TestUIGrid.cs

示例2: Test_NotEqualsNull

 public void Test_NotEqualsNull()
 {
     UIGrid uiGrid = new UIGrid();
     UIGrid uiGrid2 = null;
     Assert.IsFalse(uiGrid.Equals(uiGrid2));
     Assert.IsFalse(uiGrid == uiGrid2);
     Assert.IsTrue(uiGrid != uiGrid2);
     Assert.AreNotEqual(uiGrid, uiGrid2);
 }
开发者ID:kevinbosman,项目名称:habanero,代码行数:9,代码来源:TestUIGrid.cs

示例3: Test_NotEqualSortColumn

        public void Test_NotEqualSortColumn()
        {
            //---------------Set up test pack-------------------
            UIGrid uiGrid1 = new UIGrid();
            UIGrid uiGrid2 = new UIGrid();

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

            //---------------Execute Test ----------------------
            uiGrid1.SortColumn = "col";
            uiGrid2.SortColumn = "col2";

            //---------------Test Result -----------------------
            Assert.IsFalse(uiGrid1.Equals(uiGrid2));
            Assert.IsFalse(uiGrid1 == uiGrid2);
            Assert.IsTrue(uiGrid1 != uiGrid2);
        }
开发者ID:kevinbosman,项目名称:habanero,代码行数:17,代码来源:TestUIGrid.cs

示例4: Test_EqualHasCopyOfGridColumn

        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 -------------------------          
        }
开发者ID:kevinbosman,项目名称:habanero,代码行数:17,代码来源:TestUIGrid.cs

示例5: Test_NotEqualHasTheDifferentPropName_GridColumn

        public void Test_NotEqualHasTheDifferentPropName_GridColumn()
        {
            UIGrid uiGrid = new UIGrid();
            UIGridColumn uiGridColumn = GetUiGridColumn();
            uiGrid.Add(uiGridColumn);

            UIGrid uiGrid2 = new UIGrid();
            UIGridColumn uiGridColumn2 = GetUiGridColumn("Diff Prop Name");
            uiGrid2.Add(uiGridColumn2);

            Assert.IsFalse(uiGrid.Equals(uiGrid2));
            Assert.IsFalse(uiGrid == uiGrid2);
            Assert.IsTrue(uiGrid != uiGrid2);
        }
开发者ID:kevinbosman,项目名称:habanero,代码行数:14,代码来源:TestUIGrid.cs

示例6: Test_NotEqual_HasDifferentNumbersOfColumns

        public void Test_NotEqual_HasDifferentNumbersOfColumns()
        {
            //---------------Set up test pack-------------------
            UIGrid uiGrid = new UIGrid();
            UIGridColumn uiGridColumn = GetUiGridColumn();
            uiGrid.Add(uiGridColumn);
            uiGrid.Add(GetUiGridColumn());

            UIGrid uiGrid2 = new UIGrid();
            uiGrid2.Add(uiGridColumn);
            //--------------Assert PreConditions----------------            
            Assert.AreEqual(2, uiGrid.Count);
            Assert.AreEqual(1, uiGrid2.Count);
            //---------------Execute Test ----------------------

            //---------------Test Result -----------------------
            Assert.IsFalse(uiGrid.Equals(uiGrid2));
            Assert.IsFalse(uiGrid == uiGrid2);
            Assert.IsTrue(uiGrid != uiGrid2);
            //---------------Tear Down -------------------------          
        }
开发者ID:kevinbosman,项目名称:habanero,代码行数:21,代码来源:TestUIGrid.cs

示例7: Test_EqualHasTheSameGridColumn

        public void Test_EqualHasTheSameGridColumn()
        {
            UIGrid uiGrid = new UIGrid();
            UIGridColumn uiGridColumn = GetUiGridColumn();
            uiGrid.Add(uiGridColumn);

            UIGrid uiGrid2 = new UIGrid();
            //UIGridColumn uiGridColumn2 = GetUiGridColumn();
            uiGrid2.Add(uiGridColumn);

            Assert.IsTrue(uiGrid.Equals(uiGrid2));
            Assert.IsTrue(uiGrid == uiGrid2);
            Assert.IsFalse(uiGrid != uiGrid2);
        }
开发者ID:kevinbosman,项目名称:habanero,代码行数:14,代码来源:TestUIGrid.cs

示例8: Test_NotEqual_OtherType

        public void Test_NotEqual_OtherType()
        {
            //---------------Set up test pack-------------------
            UIGrid uiGrid = new UIGrid();
            //--------------Assert PreConditions----------------            

            //---------------Execute Test ----------------------
            
            Assert.IsFalse(uiGrid.Equals("BNLJ JOLJ"));
            //---------------Test Result -----------------------

            //---------------Tear Down -------------------------          
        }
开发者ID:kevinbosman,项目名称:habanero,代码行数:13,代码来源:TestUIGrid.cs


注:本文中的UIGrid.Equals方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。