public void WhenReadingInCorrectHeaderThenReturnFalse()
        {
            _inputDataToMemory = new InputDataToMemory(_errorHandler.Object);
            string line = "Incorrect Product, Origin Year, Development Year, Incremental Value";
            bool   expected;

            expected = _inputDataToMemory.HeaderValidated(line);
            Assert.AreEqual(false, expected);
        }
        public void WhenAddingCorrectLineThenReturnTrue()
        {
            _inputDataToMemory = new InputDataToMemory(_errorHandler.Object);
            string line = "Comp, 1992, 1992, 110.0";
            bool   expected;

            expected = _inputDataToMemory.AddLine(line);
            Assert.AreEqual(true, expected);
        }
        public void WhenAddingIncorrectLineThenReturnFalse()
        {
            _inputDataToMemory = new InputDataToMemory(_errorHandler.Object);
            string line = "Incorrect Line";
            bool   expected;

            expected = _inputDataToMemory.AddLine(line);
            Assert.AreEqual(false, expected);
        }
 public void WhenObjectCreatedThenInputTablesIsNotNull()
 {
     _inputDataToMemory = new InputDataToMemory(_errorHandler.Object);
     Assert.IsNotNull(_inputDataToMemory.InputTables);
 }
Ejemplo n.º 5
0
 public MatrixLoader(IErrorHandler errorHandler, IInputDataToMemory inputDataToMemory, IFileServices fileServices)
 {
     _errorHandler      = errorHandler;
     _inputDataToMemory = inputDataToMemory;
     _fileServices      = fileServices;
 }