public static AccountTransactionViewModel CreateATPViewModel(Dispatcher dispatcher)
 {
     var dirPath = ConfigurationManager.AppSettings["csvpath"];
     var processors = new Dictionary<string, IFileProcessor>
           {
               {"CSV", new CsvFileProcessor(dirPath) }
           };
     var fileProcessorFactory = new FileProcessorFactory(processors);
     var accValidator = new AccTransactionValidator(new CurrencyValidator());
     var viewModel = new AccountTransactionViewModel(fileProcessorFactory, new ThreadExecutor(dispatcher), new DataService(), accValidator);
     return viewModel;
 }
        public void Validate_ValidFieldsAndInvalidCurrency_ReturnsErrorMsg()
        {
            var validator = new AccTransactionValidator(new CurrencyValidator());

            Assert.IsNotNull(validator.Validate(_validWithInvalidCurrency));
        }
 public void Validate_ValidFieldsAndValidCurrency_ReturnsNull()
 {
     var validator = new AccTransactionValidator(new CurrencyValidator());
     Assert.IsNull(validator.Validate(_validFieldsValidCurrency));
 }
        public void Validate_InvalidFields_ReturnsErrorMsg()
        {
            var validator = new AccTransactionValidator(new CurrencyValidator());

            Assert.IsNotNull(validator.Validate(_invalidFields));
        }