本文整理汇总了C#中Corner.AddWalls方法的典型用法代码示例。如果您正苦于以下问题:C# Corner.AddWalls方法的具体用法?C# Corner.AddWalls怎么用?C# Corner.AddWalls使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Corner
的用法示例。
在下文中一共展示了Corner.AddWalls方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MixedAddWalls
public void MixedAddWalls()
{
//Arrange
Corner corn1 = new Corner(new PointF(0, 0));
Corner corn2 = new Corner(new PointF(10, 0));
Corner corn3 = new Corner(new PointF(10, 10));
Wall wall = new Wall(corn1, corn2);
Door door = new Door(corn2, corn3);
//Act
corn2.AddWalls(wall, door);
//Assert
IList lWalls = corn2.GetWalls();
Assert.AreEqual(2, lWalls.Count);
Assert.AreEqual(wall, lWalls[0]);
Assert.AreEqual(door, lWalls[1]);
}
示例2: NullAddWalls
public void NullAddWalls()
{
//Arrange
Corner corn1 = new Corner(new PointF(0, 0));
Corner corn2 = new Corner(new PointF(10, 0));
Corner corn3 = new Corner(new PointF(10, 10));
Wall wall1 = new Wall(corn1, corn2);
Wall wall2 = null;
//Act
corn2.AddWalls(wall2, wall1);
//Assert
IList lWalls = corn2.GetWalls();
Assert.AreEqual(1, lWalls.Count);
Assert.AreEqual(wall1, lWalls[0]);
}