Ejemplo n.º 1
0
        public void Union_FirstElementAppearsFirstInOutputScript()
        {
            var union = new Cube().Union(new Cylinder());
            string script = union.ToString();

            Assert.IsTrue(script.IndexOf("cube(") < script.IndexOf("cylinder("));
        }
Ejemplo n.º 2
0
        public void Union_FirstStatementInOutputScriptIsUnionMethodCall()
        {
            var union = new Cube().Union(new Cylinder());
            string script = union.ToString();

            Assert.IsTrue(script.StartsWith("union()"));
        }
Ejemplo n.º 3
0
        public void Union_AffectedObjectsAreInOutputScript()
        {
            var union = new Cube().Union(new Cylinder());
            string script = union.ToString();

            Assert.IsTrue(script.Contains("cube("));
            Assert.IsTrue(script.Contains("cylinder("));
        }
Ejemplo n.º 4
0
        public void Cube_SizeAppearsInOutput()
        {
            var cube = new Cube(new Vector3(1.5, 5.5, 8.7));

            string script = cube.ToString();

            Assert.IsTrue(script.Contains(String.Format("size = [{0}, {1}, {2}]", 1.5, 5.5, 8.7)));
        }
Ejemplo n.º 5
0
        public void Cube_ParameterlessCubeHasMethodCallInIt()
        {
            var cube = new Cube();

            string script = cube.ToString();

            Assert.IsTrue(script.StartsWith("cube("));
            Assert.IsTrue(script.TrimEnd().EndsWith(");"));
        }
Ejemplo n.º 6
0
        public void Cube_LengthWidthHeightAppearsInScriptOutput()
        {
            var cube = new Cube(15, 5, 12);

            string script = cube.ToString();

            Assert.IsTrue(script.Contains("size = [15, 5, 12]"));
        }