public void Constructor_ExpectedPropertiesSet() { // Setup var outerLoop = new SoilLayer2DLoop(new Segment2D[0]); IEnumerable <SoilLayer2DLoop> innerLoops = Enumerable.Empty <SoilLayer2DLoop>(); // Call var geometry = new SoilLayer2DGeometry(outerLoop, innerLoops); // Assert Assert.AreSame(outerLoop, geometry.OuterLoop); Assert.AreSame(innerLoops, geometry.InnerLoops); }
public void Constructor_ExpectedPropertiesSet() { // Setup var outerLoop = new SoilLayer2DLoop(new Segment2D[0]); IEnumerable <SoilLayer2D> nestedLayers = Enumerable.Empty <SoilLayer2D>(); // Call var layer = new SoilLayer2D(outerLoop, nestedLayers); // Assert Assert.IsInstanceOf <SoilLayerBase>(layer); Assert.AreSame(outerLoop, layer.OuterLoop); Assert.AreSame(nestedLayers, layer.NestedLayers); }
public void Constructor_ConnectedSegments_SetsSegments() { // Setup var pointA = new Point2D(0.0, 0.0); var pointB = new Point2D(1.0, 0.0); var arrayWithConnectedSegments = new[] { new Segment2D(pointA, pointB), new Segment2D(pointB, pointA) }; // Call var loop = new SoilLayer2DLoop(arrayWithConnectedSegments); // Assert Assert.AreSame(arrayWithConnectedSegments, loop.Segments); }