Beispiel #1
0
        public void Sphere_ParameterlessSphereHasMethodCallAndEndsWithSemicolon()
        {
            var basicSphere = new Sphere();

            string script = basicSphere.ToString();

            Assert.IsTrue(script.StartsWith("sphere("));
            Assert.IsTrue(script.TrimEnd().EndsWith(");"));
        }
Beispiel #2
0
        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"));
        }
Beispiel #3
0
        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"));
        }