本文整理汇总了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)");
}
示例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);
}
示例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);
}
示例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 -------------------------
}
示例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);
}
示例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 -------------------------
}
示例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);
}
示例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 -------------------------
}