public void Sphere_ParameterlessSphereHasMethodCallAndEndsWithSemicolon() { var basicSphere = new Sphere(); string script = basicSphere.ToString(); Assert.IsTrue(script.StartsWith("sphere(")); Assert.IsTrue(script.TrimEnd().EndsWith(");")); }
public void Sphere_ScriptOutputDoesNotContainResolutionValuesIfNotSpecified() { var sphere = new Sphere(); string script = sphere.ToString(); Assert.IsTrue(!script.Contains("$fn")); Assert.IsTrue(!script.Contains("$fa")); Assert.IsTrue(!script.Contains("$fs")); }
public void Sphere_ScriptOutpuHasResolutionValuesIfSpecified() { var sphere = new Sphere() { Resolution = 40, MinimumAngle = 5, MinimumFragmentSize = 2 }; string script = sphere.ToString(); Assert.IsTrue(script.Contains("$fn")); Assert.IsTrue(script.Contains("$fa")); Assert.IsTrue(script.Contains("$fs")); }