NUnit.Framework.Assert.That(TActual, NUnit.Framework.Constraints.IResolveConstraint, System.Func)

Here are the examples of the csharp api NUnit.Framework.Assert.That(TActual, NUnit.Framework.Constraints.IResolveConstraint, System.Func) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

4637 Examples 7

19 View Source File : PMToolpathTest.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void TotalCuttingPlungeTest()
        {
            _powerMill.LoadProject(TestFiles.SimplePmProject1);
            replacedert.That(_powerMill.ActiveProject.Toolpaths[0].LeadsAndLinksPlungeTime, Is.EqualTo(TimeSpan.Parse("00:07:04.2000000")));
        }

19 View Source File : PMToolpathTest.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void LeadsAndLinksRampTimeTest()
        {
            _powerMill.LoadProject(TestFiles.SimplePmProject1);
            replacedert.That(_powerMill.ActiveProject.Toolpaths[0].LeadsAndLinksRampTime, Is.EqualTo(TimeSpan.Parse("00:00:00")));
        }

19 View Source File : PMToolpathTest.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void LinearCuttingTimeTest()
        {
            _powerMill.LoadProject(TestFiles.SimplePmProject1);
            replacedert.That(_powerMill.ActiveProject.Toolpaths[0].LinearCuttingTime, Is.EqualTo(TimeSpan.Parse("00:23:27.9290000")));
        }

19 View Source File : PMToolpathTest.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void ArcCuttingTimeTest()
        {
            _powerMill.LoadProject(TestFiles.SimplePmProject1);
            replacedert.That(_powerMill.ActiveProject.Toolpaths[0].ArcCuttingTime, Is.EqualTo(TimeSpan.Parse("00:00:00")));
        }

19 View Source File : PMToolPathTestGenerator.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void EndPointPositionZReadOnlyTest()
        {
            _powerMill.LoadProject(TestFiles.BasicToolpath);
            var toolpath = _powerMill.ActiveProject.Toolpaths.First();

            var result = toolpath.EndPointPositionZ;
            replacedert.That(result, Is.GreaterThan(0));
        }

19 View Source File : PMToolsCollectionTest.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void GetNewEnreplacedyNameTest()
        {
            //No enreplacedy exists, should return "1" and "NewName"
            replacedert.That(_powerMILL.ActiveProject.Tools.GetNewEnreplacedyName(), Is.EqualTo("1"));
            replacedert.That(_powerMILL.ActiveProject.Tools.GetNewEnreplacedyName("NewName"), Is.EqualTo("NewName"));

            //Create a new enreplacedy
            var tool = _powerMILL.ActiveProject.Tools.CreateBallNosedTool();

            //1 enreplacedy exists, should return "2"
            replacedert.That(_powerMILL.ActiveProject.Tools.GetNewEnreplacedyName(), Is.EqualTo("2"));

            //Rename the enreplacedy
            tool.Name = "MyPrefix";

            //1 enreplacedy called "MyPrefix" exists, should return "NewName" and "MyPrefix_1"
            replacedert.That(_powerMILL.ActiveProject.Tools.GetNewEnreplacedyName("NewName"), Is.EqualTo("NewName"));
            replacedert.That(_powerMILL.ActiveProject.Tools.GetNewEnreplacedyName("MyPrefix"), Is.EqualTo("MyPrefix_1"));

            //Delete the enreplacedy
            _powerMILL.ActiveProject.Tools.Remove(tool);
        }

19 View Source File : PMProjectTests.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void ActiveWorkplaneTest()
        {
            _powerMILL.LoadProject(TestFiles.SimplePmProject1);
            _powerMILL.ActiveProject.ActiveWorkplane = _powerMILL.ActiveProject.Workplanes[0];
            replacedert.That(_powerMILL.ActiveProject.Workplanes[0].IsActive, Is.True);
        }

19 View Source File : PMProjectTests.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void ActiveWorldWorkplaneTest()
        {
            _powerMILL.LoadProject(TestFiles.SimplePmProject1);
            _powerMILL.ActiveProject.ActiveWorkplane = _powerMILL.ActiveProject.Workplanes[0];
            replacedert.That(_powerMILL.ActiveProject.Workplanes[0].IsActive, Is.True);
            _powerMILL.ActiveProject.ActiveWorkplane = null;
            replacedert.That(_powerMILL.ActiveProject.Workplanes.All(x => x.IsActive == false), Is.True);
        }

19 View Source File : PMProjectTests.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void CreateBlockFromBoundaryWithLimitsTest()
        {               
            _powerMILL.ActiveProject.Boundaries.CreateBoundary(TestFiles.CurvesFiles);
            _powerMILL.ActiveProject.Refresh();
            PMBoundary boundary = _powerMILL.ActiveProject.Boundaries.ActiveItem;
            var boundingBox = _powerMILL.ActiveProject.CreateBlockFromBoundaryWithLimits(boundary, 0, 100);            
            replacedert.That(boundingBox.MaxZ.Value, Is.EqualTo(100));
        }

19 View Source File : PMToolpathTest.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void ShortLinkTypesTest()
        {
            if (_powerMill.Version.Major > PMEnreplacedy.POWER_MILL_2016.Major)
            {
                Console.WriteLine(@"ShortLink is not supportted in 2017");
                return;
            }
            _powerMill.LoadProject(TestFiles.BasicToolpath);
            var connections = _powerMill.ActiveProject.Toolpaths.First().Connections;
            foreach (var linkType in typeof(LinkTypes).GetEnumValues().Cast<LinkTypes>())
            {
                connections.ShortLink = linkType;
                connections.ShortLinkSecond = linkType;
                replacedert.That(connections.ShortLink, Is.EqualTo(linkType), "ShortLink not been set");
                replacedert.That(connections.ShortLink, Is.EqualTo(linkType), "ShortLinkSecond not been set");
            }
        }

19 View Source File : PMToolpathTest.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void NumberOfSegmentsTest()
        {
            _powerMill.LoadProject(TestFiles.SimplePmProject1);
            replacedert.That(_powerMill.ActiveProject.Toolpaths[0].NumberOfSegments, Is.EqualTo(101));
        }

19 View Source File : PMToolpathTest.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void SegmentLengthTest()
        {
            _powerMill.LoadProject(TestFiles.SimplePmProject1);
            replacedert.That(_powerMill.ActiveProject.Toolpaths[0].SegmentLength(0), Is.EqualTo((MM) 215.627867));
        }

19 View Source File : PMToolpathTest.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void SegmentPointsTest()
        {
            _powerMill.LoadProject(TestFiles.SimplePmProject1);
            replacedert.That(_powerMill.ActiveProject.Toolpaths[0].NumberOfPointsInSegment(0), Is.EqualTo(19));
        }

19 View Source File : PMToolpathTest.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void ToolpathPointPositionTest()
        {
            _powerMill.LoadProject(TestFiles.SimplePmProject1);
            replacedert.That(_powerMill.ActiveProject.Toolpaths[0].ToolpathPointPosition(0, 0),
                        Is.EqualTo(new Point(-60.008766, -49.997471, 0)));
        }

19 View Source File : PMToolpathTest.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void TotalCuttingTimeTest()
        {
            _powerMill.LoadProject(TestFiles.SimplePmProject1);
            replacedert.That(_powerMill.ActiveProject.Toolpaths[0].TotalCuttingTime, Is.EqualTo(TimeSpan.Parse("00:39:55.8900000")));
        }

19 View Source File : PMToolpathTest.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void BlockBoundingBoxTest()
        {
            _powerMill.LoadProject(TestFiles.BasicToolpath);
            var boundingBoxToFind = new BoundingBox(-20, 20, -20, 20, -10, 10);
            replacedert.That(_powerMill.ActiveProject.Toolpaths[0].BlockBoundingBox, Is.EqualTo(boundingBoxToFind));
        }

19 View Source File : PMToolPathTestGenerator.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void EditCuttingFeedWhileToolPathIsCalculatedTest()
        {
            _powerMill.LoadProject(TestFiles.BasicToolpath);
            var toolpath = _powerMill.ActiveProject.Toolpaths.First();

            var value = _random.Next(1, 1000);
            toolpath.CuttingFeed = value;

            var result = toolpath.CuttingFeed;
            replacedert.That(result, Is.EqualTo(value));
        }

19 View Source File : PMToolPathTestGenerator.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void EditFeedPerToothWhileToolPathIsCalculatedTest()
        {
            _powerMill.LoadProject(TestFiles.BasicToolpath);
            var toolpath = _powerMill.ActiveProject.Toolpaths.First();

            MM value = _random.Next(1, 1000);
            toolpath.FeedPerTooth = value;

            var result = toolpath.FeedPerTooth;
            replacedert.That(result, Is.EqualTo(value));
        }

19 View Source File : PMToolPathTestGenerator.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void EditLeadInFactorWhileToolPathIsCalculatedTest()
        {
            _powerMill.LoadProject(TestFiles.BasicToolpath);
            var toolpath = _powerMill.ActiveProject.Toolpaths.First();

            var value = _random.Next(1, 1000);
            toolpath.LeadInFactor = value;

            var result = toolpath.LeadInFactor;
            replacedert.That(result, Is.EqualTo(value));
        }

19 View Source File : PMToolPathTestGenerator.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void EditLeadOutFactorWhileToolPathIsCalculatedTest()
        {
            _powerMill.LoadProject(TestFiles.BasicToolpath);
            var toolpath = _powerMill.ActiveProject.Toolpaths.First();

            var value = _random.Next(1, 1000);
            toolpath.LeadOutFactor = value;

            var result = toolpath.LeadOutFactor;
            replacedert.That(result, Is.EqualTo(value));
        }

19 View Source File : PMToolPathTestGenerator.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void EditPlungingFeedWhileToolPathIsCalculatedTest()
        {
            _powerMill.LoadProject(TestFiles.BasicToolpath);
            var toolpath = _powerMill.ActiveProject.Toolpaths.First();

            var value = _random.Next(1, 1000);
            toolpath.PlungingFeed = value;

            var result = toolpath.PlungingFeed;
            replacedert.That(result, Is.EqualTo(value));
        }

19 View Source File : PMToolPathTestGenerator.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void EditSkimFeedWhileToolPathIsCalculatedTest()
        {
            _powerMill.LoadProject(TestFiles.BasicToolpath);
            var toolpath = _powerMill.ActiveProject.Toolpaths.First();

            var value = _random.Next(1, 1000);
            toolpath.SkimFeed = value;

            var result = toolpath.SkimFeed;
            replacedert.That(result, Is.EqualTo(value));
        }

19 View Source File : PMToolPathTestGenerator.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void EditStartPointApproachDistanceWhileToolPathIsCalculatedTest()
        {
            _powerMill.LoadProject(TestFiles.BasicToolpath);
            var toolpath = _powerMill.ActiveProject.Toolpaths.First();

            MM value = _random.Next(1, 1000);
            toolpath.StartPointApproachDistance = value;

            var result = toolpath.StartPointApproachDistance;
            replacedert.That(result, Is.EqualTo(value));
        }

19 View Source File : PMToolPathTestGenerator.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void StartPointApproachAlongWhileToolPathIsCalculatedTest()
        {
            _powerMill.LoadProject(TestFiles.BasicToolpath);
            var toolpath = _powerMill.ActiveProject.Toolpaths.First();
            foreach (var item in typeof(PointApproach).GetEnumValues())
            {
                toolpath.StartPointApproachAlong = (PointApproach) item;
                replacedert.That(toolpath.StartPointApproachAlong, Is.EqualTo(item));
            }
        }

19 View Source File : PMToolPathTestGenerator.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void StartPointMethodWhileToolPathIsCalculatedTest()
        {
            _powerMill.LoadProject(TestFiles.BasicToolpath);
            var toolpath = _powerMill.ActiveProject.Toolpaths.First();
            foreach (var item in typeof(StartPointMethod).GetEnumValues())
            {
                toolpath.StartPointMethod = (StartPointMethod) item;
                replacedert.That(toolpath.StartPointMethod, Is.EqualTo(item));
            }
        }

19 View Source File : PMToolPathTestGenerator.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void StartPointPositionXReadOnlyTest()
        {
            _powerMill.LoadProject(TestFiles.BasicToolpath);
            var toolpath = _powerMill.ActiveProject.Toolpaths.First();

            var result = toolpath.StartPointPositionX;
            replacedert.That(result, Is.GreaterThan(0));
        }

19 View Source File : PMToolPathTestGenerator.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void StartPointPositionYReadOnlyTest()
        {
            _powerMill.LoadProject(TestFiles.BasicToolpath);
            var toolpath = _powerMill.ActiveProject.Toolpaths.First();

            var result = toolpath.StartPointPositionY;
            replacedert.That(result, Is.GreaterThan(0));
        }

19 View Source File : PMToolPathTestGenerator.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void StartPointPositionZReadOnlyTest()
        {
            _powerMill.LoadProject(TestFiles.BasicToolpath);
            var toolpath = _powerMill.ActiveProject.Toolpaths.First();

            var result = toolpath.StartPointPositionZ;
            replacedert.That(result, Is.GreaterThan(0));
        }

19 View Source File : PMToolPathTestGenerator.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void EditEndPointApproachDistanceWhileToolPathIsCalculatedTest()
        {
            _powerMill.LoadProject(TestFiles.BasicToolpath);
            var toolpath = _powerMill.ActiveProject.Toolpaths.First();

            MM value = _random.Next(1, 1000);
            toolpath.EndPointApproachDistance = value;

            var result = toolpath.EndPointApproachDistance;
            replacedert.That(result, Is.EqualTo(value));
        }

19 View Source File : PMToolPathTestGenerator.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void EndPointPositionYReadOnlyTest()
        {
            _powerMill.LoadProject(TestFiles.BasicToolpath);
            var toolpath = _powerMill.ActiveProject.Toolpaths.First();

            var result = toolpath.EndPointPositionY;
            replacedert.That(result, Is.GreaterThan(0));
        }

19 View Source File : PMToolPathTestGenerator.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void MoveTypeOnLeadInSecondTest()
        {
            _powerMill.LoadProject(TestFiles.BasicToolpath);
            var lead = _powerMill.ActiveProject.Toolpaths.First().Connections.LeadInSecond;
            foreach (var moveType in typeof(MoveType).GetEnumValues())
            {
                lead.MoveType = (MoveType) moveType;
                replacedert.That(lead.MoveType, Is.EqualTo(moveType));
            }
        }

19 View Source File : PMToolPathTestGenerator.cs
License : MIT License
Project Creator : Autodesk

public void RampFollowOnLeadInSecondTest()
        {
            _powerMill.LoadProject(TestFiles.BasicToolpath);
            var lead = _powerMill.ActiveProject.Toolpaths.First().Connections.LeadIn;
            foreach (var rampFollow in typeof(RampFollow).GetEnumValues())
            {
                lead.Ramp.Follow = (RampFollow) rampFollow;
                replacedert.That(lead.Ramp.Follow, Is.EqualTo(rampFollow));
            }
        }

19 View Source File : PMToolPathTestGenerator.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void RampHeightOnLeadInSecondTest()
        {
            _powerMill.LoadProject(TestFiles.BasicToolpath);
            var lead = _powerMill.ActiveProject.Toolpaths.First().Connections.LeadInSecond;
            foreach (var rampHeight in typeof(RampHeight).GetEnumValues())
            {
                lead.Ramp.RampHeight = (RampHeight) rampHeight;
                replacedert.That(lead.Ramp.RampHeight, Is.EqualTo(rampHeight));
            }
        }

19 View Source File : PMToolPathTestGenerator.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void MoveTypeOnFirstLeadInTest()
        {
            _powerMill.LoadProject(TestFiles.BasicToolpath);
            var lead = _powerMill.ActiveProject.Toolpaths.First().Connections.FirstLeadIn;
            foreach (var moveType in typeof(MoveType).GetEnumValues())
            {
                lead.MoveType = (MoveType) moveType;
                replacedert.That(lead.MoveType, Is.EqualTo(moveType));
            }
        }

19 View Source File : PMToolPathTestGenerator.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void LeadOutExtensionTest()
        {
            var angle = _random.NextDouble();
            var distance = _random.Next();
            var radius = _random.NextDouble();
            _powerMill.LoadProject(TestFiles.BasicToolpath);
            var lead = _powerMill.ActiveProject.Toolpaths.First().Connections.LeadOutExtension;

            lead.Angle = angle;
            lead.Distance = distance;
            lead.Radius = radius;

            replacedert.That(lead.LeadType, Is.EqualTo(LeadTypes.LeadOutExtension));
            replacedert.That(lead.Angle.Value, Is.EqualTo(angle).Within(TOLERANCE));
            replacedert.That(lead.Distance.Value, Is.EqualTo(distance).Within(TOLERANCE));
            replacedert.That(lead.Radius.Value, Is.EqualTo(radius).Within(TOLERANCE));
        }

19 View Source File : PMToolPathTestGenerator.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void MoveTypeOnLeadOutSecondTest()
        {
            _powerMill.LoadProject(TestFiles.BasicToolpath);
            var lead = _powerMill.ActiveProject.Toolpaths.First().Connections.LeadOutSecond;
            foreach (var moveType in typeof(MoveType).GetEnumValues())
            {
                lead.MoveType = (MoveType) moveType;
                replacedert.That(lead.MoveType, Is.EqualTo(moveType));
            }
        }

19 View Source File : PMToolPathTestGenerator.cs
License : MIT License
Project Creator : Autodesk

public void RampFollowOnLeadOutSecondTest()
        {
            _powerMill.LoadProject(TestFiles.BasicToolpath);
            var lead = _powerMill.ActiveProject.Toolpaths.First().Connections.LeadIn;
            foreach (var rampFollow in typeof(RampFollow).GetEnumValues())
            {
                lead.Ramp.Follow = (RampFollow) rampFollow;
                replacedert.That(lead.Ramp.Follow, Is.EqualTo(rampFollow));
            }
        }

19 View Source File : PMToolPathTestGenerator.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void RampHeightOnLeadOutSecondTest()
        {
            _powerMill.LoadProject(TestFiles.BasicToolpath);
            var lead = _powerMill.ActiveProject.Toolpaths.First().Connections.LeadOutSecond;
            foreach (var rampHeight in typeof(RampHeight).GetEnumValues())
            {
                lead.Ramp.RampHeight = (RampHeight) rampHeight;
                replacedert.That(lead.Ramp.RampHeight, Is.EqualTo(rampHeight));
            }
        }

19 View Source File : PMToolPathTestGenerator.cs
License : MIT License
Project Creator : Autodesk

public void RampFollowOnFirstLeadInTest()
        {
            _powerMill.LoadProject(TestFiles.BasicToolpath);
            var lead = _powerMill.ActiveProject.Toolpaths.First().Connections.LeadIn;
            foreach (var rampFollow in typeof(RampFollow).GetEnumValues())
            {
                lead.Ramp.Follow = (RampFollow) rampFollow;
                replacedert.That(lead.Ramp.Follow, Is.EqualTo(rampFollow));
            }
        }

19 View Source File : PMToolPathTestGenerator.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void RampHeightOnFirstLeadInTest()
        {
            _powerMill.LoadProject(TestFiles.BasicToolpath);
            var lead = _powerMill.ActiveProject.Toolpaths.First().Connections.FirstLeadIn;
            foreach (var rampHeight in typeof(RampHeight).GetEnumValues())
            {
                lead.Ramp.RampHeight = (RampHeight) rampHeight;
                replacedert.That(lead.Ramp.RampHeight, Is.EqualTo(rampHeight));
            }
        }

19 View Source File : PMToolPathTestGenerator.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void MoveTypeOnLeadInExtensionTest()
        {
            _powerMill.LoadProject(TestFiles.BasicToolpath);
            var lead = _powerMill.ActiveProject.Toolpaths.First().Connections.LeadInExtension;
            foreach (var moveType in typeof(ExtensionLeadMoveTypes).GetEnumValues())
            {
                lead.MoveType = (ExtensionLeadMoveTypes) moveType;
                replacedert.That(lead.MoveType, Is.EqualTo(moveType));
            }
        }

19 View Source File : PMToolPathTestGenerator.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void MoveTypeOnLeadOutExtensionTest()
        {
            _powerMill.LoadProject(TestFiles.BasicToolpath);
            var lead = _powerMill.ActiveProject.Toolpaths.First().Connections.LeadOutExtension;
            foreach (var moveType in typeof(ExtensionLeadMoveTypes).GetEnumValues())
            {
                lead.MoveType = (ExtensionLeadMoveTypes) moveType;
                replacedert.That(lead.MoveType, Is.EqualTo(moveType));
            }
        }

19 View Source File : PMToolTest.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void HolderLengthTest()
        {           
            if (_powerMill.Version < new Version("15.0"))
            {
                replacedert.Inconclusive("Test not available for this version of PowerMILL");
            }
            var tool = _powerMill.ActiveProject.Tools[12];            
            replacedert.That((MM)50.0, Is.EqualTo(tool.HolderLength));
        }

19 View Source File : PMToolTest.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void GaugeLengthTest()
        {
            if (_powerMill.Version < new Version("15.0"))
            {
                replacedert.Inconclusive("Test not available for this version of PowerMILL");
            }
            var tool = _powerMill.ActiveProject.Tools[12];            
            replacedert.That((MM)95.0, Is.EqualTo(tool.GaugeLength));
        }

19 View Source File : PMToolTest.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void TaperDiameterTest()
        {
            if (_powerMill.Version < new Version("15.0"))
            {
                replacedert.Inconclusive("Test not available for this version of PowerMILL");
            }
            var tool = (PMToolTaperedTipped) _powerMill.ActiveProject.Tools[4];
            replacedert.That(tool.TaperDiameter.Value, Is.EqualTo(4.860317).Within(TOLERANCE));
        }

19 View Source File : PMToolTipRadiusedTest.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void TipRadiusTest()
        {
            var tool = (PMToolTipRadiused)_powerMill.ActiveProject.Tools[2];
            var current = tool.TipRadius;
            tool.TipRadius = current + 0.2;
            replacedert.That(tool.TipRadius, Is.EqualTo(current + 0.2));
        }

19 View Source File : CompCurvesCollectionTest.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void CreateCurvesFromPumpkin()
        {
            var activeModel = _powerSHAPE.Models.CreateModelFromFile(new File(TestFiles.PUMPKIN_MODEL));
            var surface = activeModel.Surfaces.Last();
            var curves = activeModel.CompCurves.ToList<PSGenericCurve>();
            var result = activeModel.Curves.CreateCurvesFromWrap(surface, curves, 90.0);
            replacedert.That(result.Count, Is.EqualTo(20));
            replacedert.That(result[0].BoundingBox.MinZ, Is.EqualTo((MM) (-11.850173)));
        }

19 View Source File : SolidsCollectionTest.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void CreateSolidCone()
        {
            // Create a cone
            var cone = _powerSHAPE.ActiveModel.Solids.CreateCone(new Point());

            // Check that solid has been created
            replacedert.That(_powerSHAPE.ActiveModel.Solids.Count, Is.EqualTo(1));

            // Check that solid has the correct type
            replacedert.That(cone.Type, Is.EqualTo(SolidTypes.Cone));
        }

19 View Source File : SolidsCollectionTest.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void CreateSolidTorus()
        {
            // Create a Torus
            var torus = _powerSHAPE.ActiveModel.Solids.CreateTorus(new Point());

            // Check that solid has been created
            replacedert.That(_powerSHAPE.ActiveModel.Solids.Count, Is.EqualTo(1));

            // Check that solid has the correct type
            replacedert.That(torus.Type, Is.EqualTo(SolidTypes.Torus));
        }

19 View Source File : SolidsCollectionTest.cs
License : MIT License
Project Creator : Autodesk

[Test]
        public void CreateSolidSpring()
        {
            // Create a spring
            var spring = _powerSHAPE.ActiveModel.Solids.CreateSpring(new Point());

            // Check that solid has been created
            replacedert.That(_powerSHAPE.ActiveModel.Solids.Count, Is.EqualTo(1));

            // Check that solid has the correct type
            replacedert.That(spring.Type, Is.EqualTo(SolidTypes.Spring));
        }

See More Examples