public void ClassifyRecord_ShouldCallClassifier()
        {
            var record = new FakeRecord();

            _tree.ClassifyRecord(record);

            _classifierMock
            .Verify(x => x.Classify(record, _tree.Root), Times.Once);
        }
Exemplo n.º 2
0
        public void ShouldGetCorrectNumberOfClassificationErrors()
        {
            var errors = 0;

            foreach (var record in _repository.CsvLinesNormalized)
            {
                var action       = _tree.ClassifyRecord(record);
                var marketAction = (MarketAction)Enum.Parse(typeof(MarketAction), record.Action);
                if (action != marketAction)
                {
                    errors++;
                }
            }

            Assert.AreEqual(427, errors);
        }