Example #1
0
        public void WriteOnePolygonTwiceForThreeColorspecs()
        {
            var polygons = new List <Polygon> {
                this.createDefaultPolygon(), this.createOtherPolygon()
            };
            List <ColorTranslation> ctSingle = this.createSingleColorTranslation();
            List <ColorTranslation> ctDouble = this.createDoubleColorTranslation();

            var stitchesSingle = StepWriter.WriteStitches(ctSingle, polygons);
            var stitchesDouble = StepWriter.WriteStitches(ctDouble, polygons);

            Assert.IsTrue(stitchesSingle.Count() * 2 - 1 > stitchesDouble.Count());
        }
Example #2
0
        public void FillBorderOrderIsMaintained()
        {
            var polygons = new List <Polygon> {
                this.createDefaultPolygon()
            };
            List <ColorTranslation> ctForward  = this.createColorAndStrokeTranslation();
            List <ColorTranslation> ctBackward = this.createColorAndStrokeTranslation();

            ctBackward.Reverse();

            var stitchesForward  = StepWriter.WriteStitches(ctForward, polygons);
            var stitchesBackward = StepWriter.WriteStitches(ctBackward, polygons);

            Assert.AreNotEqual(stitchesForward.Skip(1).First(), stitchesBackward.Skip(1).First());
        }
Example #3
0
        public void WritesPolygonTwiceForTwoColorspecs()
        {
            var polygons = new List <Polygon> {
                this.createDefaultPolygon()
            };
            List <ColorTranslation> ctSingle = this.createSingleColorTranslation();
            List <ColorTranslation> ctDouble = this.createDoubleColorTranslation();

            var stitchesSingle = StepWriter.WriteStitches(ctSingle, polygons);
            var stitchesDouble = StepWriter.WriteStitches(ctDouble, polygons);

            Assert.AreNotEqual(0, stitchesDouble.Count());

            // substract one for final command
            Assert.AreEqual(stitchesSingle.Count() * 2 - 1, stitchesDouble.Count());
        }