+ Added bindings for the remainder of Sphere's properties

+ Tests for Sphere properties
This commit is contained in:
Michael Smith 2016-02-29 18:43:35 -08:00
parent 5487af3d95
commit d80e2c036a
2 changed files with 19 additions and 1 deletions

View File

@ -148,5 +148,23 @@ namespace OSCADSharp.UnitTests
string script = sphere.ToString();
Assert.IsTrue(script.Contains("d = diam"));
}
[TestMethod]
public void Sphere_ResolutionAngleAndFragmentSizeTest()
{
var resolution = new Variable("resolution", 30);
var angle = new Variable("angle", 5);
var fragSize = new Variable("fragSize", 10);
var sphere = new Sphere();
sphere.Bind("Resolution", resolution);
sphere.Bind("MinimumAngle", angle);
sphere.Bind("MinimumFragmentSize", fragSize);
string script = sphere.ToString();
Assert.IsTrue(script.Contains("$fn = resolution"));
Assert.IsTrue(script.Contains("$fa = angle"));
Assert.IsTrue(script.Contains("$fs = fragSize"));
}
}
}

View File

@ -134,7 +134,7 @@ namespace OSCADSharp.Solids
{
{ "radius", "r" },
{ "minimumangle", "$fa" },
{ "minimumFragmentsize", "$fs" },
{ "minimumfragmentsize", "$fs" },
{ "resolution", "$fn" },
{ "diameter", "d" }
});