Algorithmix.UnitTest.Helpers.BootstrapPrimitiveThree C# (CSharp) Method

BootstrapPrimitiveThree() public static method

public static BootstrapPrimitiveThree ( ) : List
return List
        public static List<Shred> BootstrapPrimitiveThree()
        {
            Console.WriteLine("Building Shreds");
            var path = Path.Combine(Drive.GetDriveRoot(), Dir.PrimitiveTestDirectory, Dir.PrimitiveTestThreeNormal);
            var shreds = Shred.Factory("Shred", path, false);
            return shreds;
        }

Usage Example

Example #1
0
        public void PrimitiveTest()
        {
            var shreds = Helpers.BootstrapPrimitiveThree();
            // 3 Shreds
            var a = shreds[0];
            var b = shreds[1];
            var c = shreds[2];

            var dataAB = MatchData.CompareShred(a, b,
                                                Direction.FromRight,
                                                Orientation.Regular,
                                                Direction.FromLeft,
                                                Orientation.Regular);
            var dataBA = MatchData.CompareShred(a, b,
                                                Direction.FromLeft,
                                                Orientation.Regular,
                                                Direction.FromRight,
                                                Orientation.Regular);

            Assert.IsTrue(dataAB.ChamferSimilarity > dataBA.ChamferSimilarity);

            var dataBC = MatchData.CompareShred(b, c,
                                                Direction.FromRight,
                                                Orientation.Regular,
                                                Direction.FromLeft,
                                                Orientation.Regular);

            var dataCB = MatchData.CompareShred(b, c,
                                                Direction.FromLeft,
                                                Orientation.Regular,
                                                Direction.FromRight,
                                                Orientation.Regular);

            Assert.IsTrue(dataBC.ChamferSimilarity > dataCB.ChamferSimilarity);

            var dataAC = MatchData.CompareShred(a, c,
                                                Direction.FromRight,
                                                Orientation.Regular,
                                                Direction.FromLeft,
                                                Orientation.Regular);

            Assert.IsTrue(dataBC.ChamferSimilarity > dataAC.ChamferSimilarity);
        }