Beispiel #1
0
        public void Test_Forward_MissingFirstPositionBarcode_1MostLikely2to5Affirmative6MostLikely()
        {
            List <string> scannedBarcode = new List <string>()
            {
                "Sample1",
                m_FixedPositionBarcode[1], "Sample2",
                m_FixedPositionBarcode[2], "Sample3",
                m_FixedPositionBarcode[3], "Sample4",
                m_FixedPositionBarcode[4], "Sample5",
                m_FixedPositionBarcode[5], "Sample6"
            };
            ScanBarcodeSimulation scanSimulation = new ScanBarcodeSimulation(m_FixedPositionBarcode);
            List <BarcodeEntity>  pickedBarcodes = scanSimulation.Scan(scannedBarcode);

            Dictionary <int, BarcodeEntity> expectedResults = new Dictionary <int, BarcodeEntity>()
            {
                { 1, new BarcodeEntity(1, "Sample1", BarcodePossibility.MostLikely) },
                { 2, new BarcodeEntity(2, "Sample2", BarcodePossibility.Affirmative) },
                { 3, new BarcodeEntity(3, "Sample3", BarcodePossibility.Affirmative) },
                { 4, new BarcodeEntity(4, "Sample4", BarcodePossibility.Affirmative) },
                { 5, new BarcodeEntity(5, "Sample5", BarcodePossibility.Affirmative) },
                { 6, new BarcodeEntity(6, "Sample6", BarcodePossibility.MostLikely) },
            };

            CompareResults(expectedResults, pickedBarcodes);
        }
Beispiel #2
0
        public void Test_MixOrder_ForwardThreePositionsReverseOnePositionForwardToEnd_1to2Affirmative3Unreliable()
        {
            List <string> scannedBarcode = new List <string>()
            {
                m_FixedPositionBarcode[0], "Sample1",
                m_FixedPositionBarcode[1],
                m_FixedPositionBarcode[2], "Sample3",
                "Sample3", m_FixedPositionBarcode[2],
                "Sample2", m_FixedPositionBarcode[1],
                "Sample2",
                m_FixedPositionBarcode[2], "Sample3",
                m_FixedPositionBarcode[3], "Sample4",
                m_FixedPositionBarcode[4], "Sample5",
                m_FixedPositionBarcode[5], "Sample6"
            };
            ScanBarcodeSimulation scanSimulation = new ScanBarcodeSimulation(m_FixedPositionBarcode);
            List <BarcodeEntity>  pickedBarcodes = scanSimulation.Scan(scannedBarcode);

            Dictionary <int, BarcodeEntity> expectedResults = new Dictionary <int, BarcodeEntity>()
            {
                { 1, new BarcodeEntity(1, "Sample1", BarcodePossibility.Affirmative) },
                { 2, new BarcodeEntity(2, "Sample2", BarcodePossibility.Affirmative) },
                { 3, new BarcodeEntity(3, "Sample3", BarcodePossibility.Affirmative) },
                { 4, new BarcodeEntity(4, "Sample4", BarcodePossibility.Affirmative) },
                { 5, new BarcodeEntity(5, "Sample5", BarcodePossibility.Affirmative) },
                { 6, new BarcodeEntity(6, "Sample6", BarcodePossibility.MostLikely) },
            };

            CompareResults(expectedResults, pickedBarcodes);
        }
Beispiel #3
0
        public void Test_Reverse_MissingLastThreeBarcodes_1None2Unreliable3to5Affirmative6MostLikely()
        {
            List <string> scannedBarcode = new List <string>()
            {
                "Sample6", m_FixedPositionBarcode[5],
                "Sample5", m_FixedPositionBarcode[4],
                "Sample4", m_FixedPositionBarcode[3],
                "Sample3", m_FixedPositionBarcode[2],
                "Sample2"
            };
            ScanBarcodeSimulation scanSimulation = new ScanBarcodeSimulation(m_FixedPositionBarcode);
            List <BarcodeEntity>  pickedBarcodes = scanSimulation.Scan(scannedBarcode);

            Dictionary <int, BarcodeEntity> expectedResults = new Dictionary <int, BarcodeEntity>()
            {
                { 2, new BarcodeEntity(2, "Sample2", BarcodePossibility.Unreliable) },
                { 3, new BarcodeEntity(3, "Sample3", BarcodePossibility.Affirmative) },
                { 4, new BarcodeEntity(4, "Sample4", BarcodePossibility.Affirmative) },
                { 5, new BarcodeEntity(5, "Sample5", BarcodePossibility.Affirmative) },
                { 6, new BarcodeEntity(6, "Sample6", BarcodePossibility.MostLikely) },
            };

            CompareResults(expectedResults, pickedBarcodes);
        }
Beispiel #4
0
        public void Test_Reverse_MissingThreeMidContinuousBarcodes_1to2Affirmative4to5Unreliable6MostLikely()
        {
            List <string> scannedBarcode = new List <string>()
            {
                "Sample6", m_FixedPositionBarcode[5],
                "Sample5",
                "Sample3", m_FixedPositionBarcode[2],
                "Sample2", m_FixedPositionBarcode[1],
                "Sample1", m_FixedPositionBarcode[0]
            };
            ScanBarcodeSimulation scanSimulation = new ScanBarcodeSimulation(m_FixedPositionBarcode);
            List <BarcodeEntity>  pickedBarcodes = scanSimulation.Scan(scannedBarcode);

            Dictionary <int, BarcodeEntity> expectedResults = new Dictionary <int, BarcodeEntity>()
            {
                { 1, new BarcodeEntity(1, "Sample1", BarcodePossibility.Affirmative) },
                { 2, new BarcodeEntity(2, "Sample2", BarcodePossibility.Affirmative) },
                { 4, new BarcodeEntity(4, "Sample3", BarcodePossibility.Unreliable) },
                { 5, new BarcodeEntity(5, "Sample5", BarcodePossibility.Unreliable) },
                { 6, new BarcodeEntity(6, "Sample6", BarcodePossibility.MostLikely) },
            };

            CompareResults(expectedResults, pickedBarcodes);
        }
Beispiel #5
0
        public void Test_Forward_MissingLastTwoBarcodes_1to4Affirmative5Unreliable6None()
        {
            List <string> scannedBarcode = new List <string>()
            {
                m_FixedPositionBarcode[0], "Sample1",
                m_FixedPositionBarcode[1], "Sample2",
                m_FixedPositionBarcode[2], "Sample3",
                m_FixedPositionBarcode[3], "Sample4",
                m_FixedPositionBarcode[4], "Sample5"
            };
            ScanBarcodeSimulation scanSimulation = new ScanBarcodeSimulation(m_FixedPositionBarcode);
            List <BarcodeEntity>  pickedBarcodes = scanSimulation.Scan(scannedBarcode);

            Dictionary <int, BarcodeEntity> expectedResults = new Dictionary <int, BarcodeEntity>()
            {
                { 1, new BarcodeEntity(1, "Sample1", BarcodePossibility.Affirmative) },
                { 2, new BarcodeEntity(2, "Sample2", BarcodePossibility.Affirmative) },
                { 3, new BarcodeEntity(3, "Sample3", BarcodePossibility.Affirmative) },
                { 4, new BarcodeEntity(4, "Sample4", BarcodePossibility.Affirmative) },
                { 5, new BarcodeEntity(5, "Sample5", BarcodePossibility.Unreliable) },
            };

            CompareResults(expectedResults, pickedBarcodes);
        }