public void PointToolNodeCreationTest() { ShapeBuildHelper.BuildTestPointUsingClicks(Setup); Assert.AreEqual(2, Setup.Document.Root.Children.Count); Assert.AreEqual("Sketch-1", Setup.Document.Root.Children[0].Get <TreeData.AttributeInterpreter.StringInterpreter>().Value); Assert.AreEqual("Point-1", Setup.Document.Root.Children[1].Get <TreeData.AttributeInterpreter.StringInterpreter>().Value); }
public void ConeMetaToolNodeCreationTest() { ShapeBuildHelper.BuildMetaActionTestCone(Setup); Assert.AreEqual(2, Setup.Document.Root.Children.Count); Assert.AreEqual("Sketch-1", Setup.Document.Root.Children[0].Get <TreeData.AttributeInterpreter.StringInterpreter>().Value); Assert.AreEqual("Cone-1", Setup.Document.Root.Children[1].Get <TreeData.AttributeInterpreter.StringInterpreter>().Value); }
public void PointToolTransformationTest() { ShapeBuildHelper.BuildTestPointUsingClicks(Setup); Assert.AreEqual(2, Setup.Document.Root.Children.Count); var nodeBuilder = new NodeBuilder(Setup.Document.Root.Children[1]); Assert.AreEqual(nodeBuilder[1].TransformedPoint3D.IsEqual(_testedFirstPoint), true, "Invalid first point coordinate"); }
public void ConeMetaToolWithMousePointsTransformationTest() { ShapeBuildHelper.BuildMetaActionTestCone(Setup); // Test that a new node was added Assert.AreEqual(2, Setup.Document.Root.Children.Count); // Check transformations, coordinates and radius of the node Assert.AreEqual(SetupUtils.CheckNodeTranslationAgainst(Setup.Document.Root.Children[1], _testedFirstPoint), true, "Invalid transform interpreter on Node"); }
public void CircleNodeCreationClickTest() { ShapeBuildHelper.BuildTestCircleUsingClicks(Setup); //Test that the new nodes were added Assert.AreEqual(3, Setup.Document.Root.Children.Count); Assert.AreEqual("Sketch-1", Setup.Document.Root.Children[0].Get <TreeData.AttributeInterpreter.StringInterpreter>().Value); Assert.AreEqual("Point-1", Setup.Document.Root.Children[1].Get <TreeData.AttributeInterpreter.StringInterpreter>().Value); Assert.AreEqual("Circle-1", Setup.Document.Root.Children[2].Get <TreeData.AttributeInterpreter.StringInterpreter>().Value); }
public void ArcSERCreationTest() { ShapeBuildHelper.BuildTestSERArc(Setup); Assert.AreEqual(5, Setup.Document.Root.Children.Count); Assert.AreEqual("Sketch-1", Setup.Document.Root.Children[0].Get <StringInterpreter>().Value); Assert.AreEqual("Point-1", Setup.Document.Root.Children[1].Get <StringInterpreter>().Value); Assert.AreEqual("Point-2", Setup.Document.Root.Children[2].Get <StringInterpreter>().Value); Assert.AreEqual("Point-3", Setup.Document.Root.Children[3].Get <StringInterpreter>().Value); Assert.AreEqual("Arc3p-1", Setup.Document.Root.Children[4].Get <StringInterpreter>().Value); }
public void EllipseNodeCreationClickTest() { ShapeBuildHelper.BuildTestEllipseUsingClicks(Setup); Assert.AreEqual(5, Setup.Document.Root.Children.Count); Assert.AreEqual("Sketch-1", Setup.Document.Root.Children[0].Get <TreeData.AttributeInterpreter.StringInterpreter>().Value); Assert.AreEqual("Point-1", Setup.Document.Root.Children[1].Get <TreeData.AttributeInterpreter.StringInterpreter>().Value); Assert.AreEqual("Point-2", Setup.Document.Root.Children[2].Get <TreeData.AttributeInterpreter.StringInterpreter>().Value); Assert.AreEqual("Point-3", Setup.Document.Root.Children[3].Get <TreeData.AttributeInterpreter.StringInterpreter>().Value); Assert.AreEqual("Ellipse-1", Setup.Document.Root.Children[4].Get <TreeData.AttributeInterpreter.StringInterpreter>().Value); }
public void SketchLineToolTransformationTest() { ShapeBuildHelper.BuildTestLineUsingClicks(Setup); Assert.AreEqual(4, Setup.Document.Root.Children.Count); var nodeBuilder = new NodeBuilder(Setup.Document.Root.Children[3]); Assert.AreEqual(nodeBuilder[0].RefTransformedPoint3D.IsEqual(_testedFirstPoint), true, "Invalid first point coordinate"); Assert.AreEqual(nodeBuilder[1].RefTransformedPoint3D.IsEqual(_testedSecondPoint), true, "Invalid second point coordinate"); }
public void SketchLineToolNodeCreationTest() { ShapeBuildHelper.BuildTestLineUsingClicks(Setup); // Test that the new nodes were added Assert.AreEqual(4, Setup.Document.Root.Children.Count); Assert.AreEqual("Sketch-1", Setup.Document.Root.Children[0].Get <TreeData.AttributeInterpreter.StringInterpreter>().Value); Assert.AreEqual("Point-1", Setup.Document.Root.Children[1].Get <TreeData.AttributeInterpreter.StringInterpreter>().Value); Assert.AreEqual("Point-2", Setup.Document.Root.Children[2].Get <TreeData.AttributeInterpreter.StringInterpreter>().Value); Assert.AreEqual("LineTwoPoints-1", Setup.Document.Root.Children[3].Get <TreeData.AttributeInterpreter.StringInterpreter>().Value); }
public void SphereMetaToolWithMousePointsTransformationTest() { ShapeBuildHelper.BuildMetaActionTestSphere(Setup); Assert.AreEqual(2, Setup.Document.Root.Children.Count); // Check transformations, coordinates and radius of the node var nodeBuilder = new NodeBuilder(Setup.Document.Root.Children[1]); Assert.AreEqual(nodeBuilder[0].TransformedPoint3D.IsEqual(_testedFirstPoint), true, "Invalid first point coordinate"); var radiusFromDependency = nodeBuilder[1].Real; Assert.AreEqual(radiusFromDependency, TestedRadius, "Invalid final radius"); }
public void EllipseToolWithMousePointsTransformationTest() { ShapeBuildHelper.BuildTestEllipseUsingClicks(Setup); var nodeBuilder = new NodeBuilder(Setup.Document.Root.Children[4]); // Test that the new nodes were added Assert.AreEqual(5, Setup.Document.Root.Children.Count); // Check transformations, coordinates of the node Assert.AreEqual(nodeBuilder[0].RefTransformedPoint3D.IsEqual(_testedFirstPoint), true, "Invalid first point coordinate"); Assert.AreEqual(nodeBuilder[1].RefTransformedPoint3D.IsEqual(_testedSecondPoint), true, "Invalid second point coordinate"); Assert.AreEqual(nodeBuilder[2].RefTransformedPoint3D.IsEqual(_testedThirdPoint), true, "Invalid third point coordinate"); }
public void RectangleThreePointsNodeCreationTest() { ShapeBuildHelper.BuildTestThreePointsRectangle(Setup); Assert.AreEqual(12, Setup.Document.Root.Children.Count); Assert.AreEqual("Sketch-1", Setup.Document.Root.Children[0].Get <StringInterpreter>().Value); Assert.AreEqual("Point-1", Setup.Document.Root.Children[1].Get <StringInterpreter>().Value); Assert.AreEqual("Point-2", Setup.Document.Root.Children[2].Get <StringInterpreter>().Value); Assert.AreEqual("LineTwoPoints-1", Setup.Document.Root.Children[3].Get <StringInterpreter>().Value); Assert.AreEqual("Point-3", Setup.Document.Root.Children[4].Get <StringInterpreter>().Value); Assert.AreEqual("LineTwoPoints-2", Setup.Document.Root.Children[5].Get <StringInterpreter>().Value); Assert.AreEqual("Point-4", Setup.Document.Root.Children[6].Get <StringInterpreter>().Value); Assert.AreEqual("LineTwoPoints-3", Setup.Document.Root.Children[7].Get <StringInterpreter>().Value); Assert.AreEqual("LineTwoPoints-4", Setup.Document.Root.Children[8].Get <StringInterpreter>().Value); Assert.AreEqual("ParallelFunction-1", Setup.Document.Root.Children[9].Get <StringInterpreter>().Value); Assert.AreEqual("ParallelFunction-2", Setup.Document.Root.Children[10].Get <StringInterpreter>().Value); Assert.AreEqual("PerpendicularFunction-1", Setup.Document.Root.Children[11].Get <StringInterpreter>().Value); }
public void BoxMetaToolWithMousePointsTransformationTest() { ShapeBuildHelper.BuildMetaActionTestBox(Setup); // Test that a new node was added Assert.AreEqual(2, Setup.Document.Root.Children.Count); // Check transformations and coordinates of the node var nodeBuilder = new NodeBuilder(Setup.Document.Root.Children[1]); Assert.AreEqual( SetupUtils.CheckNodeTranslationAgainst(nodeBuilder.Node, new Point3D(_testedFirstPoint.Location)), true, "Invalid transform interpreter on Node"); Assert.AreEqual( nodeBuilder[0].TransformedAxis3D.Location.IsEqual(_testedFirstPoint.Location, Precision.Confusion), true, "Invalid first point coordinate"); }
public void CylinderMetaToolWithMousePointsTransformationTest() { ShapeBuildHelper.BuildMetaActionTestCylinder(Setup); Assert.AreEqual(2, Setup.Document.Root.Children.Count); var nodeBuilder = new NodeBuilder(Setup.Document.Root.Children[1]); var axisLocation = nodeBuilder[0].TransformedAxis3D.Location; Assert.AreEqual(SetupUtils.CheckNodeTranslationAgainst(nodeBuilder.Node, new Point3D(axisLocation)), true, "Invalid transform interpreter on Node"); Assert.AreEqual(nodeBuilder[0].TransformedAxis3D.Location.IsEqual(axisLocation, Precision.Confusion), true, "Invalid first point coordinate"); var radiusFromDependency = nodeBuilder[1].Real; Assert.AreEqual(radiusFromDependency, TestedRadius, "Invalid final radius"); var height = nodeBuilder[2].Real; Assert.AreEqual(height, TestedHeight, "Invalid height"); }
public void TorusMetaToolWithMousePointsTransformationTest() { ShapeBuildHelper.BuildMetaActionTestTorus(Setup); Assert.AreEqual(1, Setup.Document.Root.Children.Count); var nodeBuilder = new NodeBuilder(Setup.Document.Root.Children[0]); Assert.AreEqual( SetupUtils.CheckNodeTranslationAgainst(Setup.Document.Root.Children[0], new Point3D(100, 100, 100)), true, "Invalid transform interpreter on Node"); Assert.AreEqual( nodeBuilder[0].TransformedAxis3D.Location.IsEqual(new Point3D(100, 100, 100).GpPnt, Precision.Confusion), true, "Invalid first point coordinate"); var internalRadiusFromDependency = nodeBuilder[1].Real; Assert.AreEqual(internalRadiusFromDependency, TestedInternalRadius, "Invalid internal radius"); var externalRadiusFromDependency = nodeBuilder[2].Real; Assert.AreEqual(externalRadiusFromDependency, TestedExternalRadius, "Invalid external radius"); }
public void BoxMetaToolNodeCreationTest() { ShapeBuildHelper.BuildMetaActionTestBox(Setup); Assert.AreEqual(2, Setup.Document.Root.Children.Count); }
public void BooleanIntersectMetaToolNodeCreationTest() { ShapeBuildHelper.BuildMetaActionTestBoolIntersect(Setup); Assert.AreEqual(4, Setup.Document.Root.Children.Count); }
public void SplineCreationTest() { ShapeBuildHelper.BuildTestSpline(Setup); Assert.AreEqual(5, Setup.Document.Root.Children.Count); }