Ejemplo n.º 1
0
        public void AccountPatternExtractorSearchForNoItem()
        {
            var searchFor = new List <string> {
                "Amazon"
            };

            var extractor     = new AccountPatternExtractor(_ReadString, searchFor);
            var extractedData = extractor.Extract();

            Assert.AreEqual(extractedData[0].Item1.Count, 0, "No match should be found.");
            extractor.Print(extractedData);
        }
Ejemplo n.º 2
0
        public void AccountPatternExtractorSearchFor1Item()
        {
            var searchFor = new List <string> {
                "AMAZON"
            };

            var extractor     = new AccountPatternExtractor(_ReadString, searchFor);
            var extractedData = extractor.Extract();

            Assert.AreEqual(extractedData[0].Item1.Count, 45, "Unexpected number of extracted matches.");
            extractor.Print(extractedData);
        }
Ejemplo n.º 3
0
        public void AccountPatternExtractorSearchFor2Items()
        {
            var searchFor = new List <string> {
                "Zeiss", "Gutschrift"
            };

            var extractor     = new AccountPatternExtractor(_ReadString, searchFor);
            var extractedData = extractor.Extract();

            Assert.AreEqual(extractedData[0].Item1.Count, 13, "Unexpected number of extracted strings.");
            Assert.AreEqual(extractedData[1].Item1.Count, 44, "Unexpected number of extracted strings.");
            extractor.Print(extractedData);
        }
        public void AccountMonthlySumNegative1Item()
        {
            var searchFor = new List <string> {
                "AMAZON"
            };
            var extractor        = new AccountPatternExtractor(_ReadString, searchFor);
            var extractedData    = extractor.Extract();
            var extractedDataSum = new AccountMonthlySum(extractedData);

            extractedDataSum.Sum(SumIndex.Index0);
            AssertDoubleLists(_ExpectedValuesNegative, extractedDataSum.MonthlySums);
            extractedDataSum.PrintSum();
        }