I'm done with one batch of unit test updates, for the tests in MetaActionTests. Aside for the 3D related tests which are currently disabled/failing the 2D drawing tests are all passing. There are some tests that need to be added for the shapes that aren't currently covered (spline, arc and four lines rectangle) and there is a small issue with the Mirror line because of the way the axis is passed, but all tests use the current sketch / point reference structure.
There are three ways in which the shapes are 'drawn' in the unit tests:
- MetaActions-specific: we push the dependency objects to a MetaActionContainer object.
- using clicks: we add mouse clicks by calling setup.MouseInput.MouseDown and setup.MouseInput.MouseUp
- using NodeBuilder: we create a new nodeBuilder and add the needed dependencies, then call ExecuteFunction()
and depending on the shape type, we call one of the methods in ShapeBuildHelp.cs
After I'll add the missing tests I'll clean up the files and remove all old MetaAction related code that isn't used anymore and move the non-MetaAction tests in another solution.
You can find the changes here.