public void ByCurveAndLevels_ShouldCreateGeometricallyCorrectWall() { var elevation = 100; var line = Line.ByStartPointEndPoint(Point.ByCoordinates(0, 0, 100), Point.ByCoordinates(10, 10, 100)); var level0 = Level.ByElevation(elevation); var level1 = Level.ByElevation(elevation + 100); var wallType = WallType.ByName("Curtain Wall 1"); var wall = Wall.ByCurveAndLevels(line, level0, level1, wallType); wall.BoundingBox.MinPoint.Z.ShouldBeApproximately(elevation); }
public void ByCurveAndLevels_NullArgs() { var elevation = 100; var line = Line.ByStartPointEndPoint(Point.ByCoordinates(0, 0, 0), Point.ByCoordinates(10, 10, 0)); var level0 = Level.ByElevation(elevation); var level1 = Level.ByElevation(elevation + 100); var wallType = WallType.ByName("Curtain Wall 1"); Assert.Throws(typeof(ArgumentNullException), () => Wall.ByCurveAndLevels(null, level0, level1, wallType)); Assert.Throws(typeof(ArgumentNullException), () => Wall.ByCurveAndLevels(line, null, level1, wallType)); Assert.Throws(typeof(ArgumentNullException), () => Wall.ByCurveAndLevels(line, level0, null, wallType)); Assert.Throws(typeof(ArgumentNullException), () => Wall.ByCurveAndLevels(line, level0, level1, null)); }
public void ByCurveAndLevels_ValidArgs() { // prevent rebinding when creating levels ElementBinder.IsEnabled = false; var elevation = 100; var line = Line.ByStartPointEndPoint(Point.ByCoordinates(0, 0, 100), Point.ByCoordinates(10, 10, 100)); var level0 = Level.ByElevation(elevation); var level1 = Level.ByElevation(elevation + 100); var wallType = WallType.ByName("Curtain Wall 1"); var wall = Wall.ByCurveAndLevels(line, level0, level1, wallType); Assert.NotNull(wall); }