public void SaveDbInTxt_Should_Run_Writer_For_Db_Tables() { // Arrangement var accountsToList = new List <string>(); A.CallTo(() => _dbEntriesToStringListsConverter.ConvertAccountsToFileContent()).Returns(accountsToList); // var transactionsToList = new List<string>(); // A.CallTo(() => _dbEntriesToStringListsConverter.ConvertTransactionsToFileContent()).Returns(transactionsToList); var transToList = new List <string>(); A.CallTo(() => _dbEntriesToStringListsConverter.ConvertTranWithTagsToFileContent()).Returns(transToList); var associationsToList = new List <string>(); A.CallTo(() => _dbEntriesToStringListsConverter.ConvertArticlesAssociationsToFileContent()).Returns(associationsToList); var ratesToList = new List <string>(); A.CallTo(() => _dbEntriesToStringListsConverter.ConvertCurrencyRatesToFileContent()).Returns(ratesToList); // Act mUnderTest.SaveDbInTxt(); // Assert A.CallTo(() => _dbTxtFileWriter.WriteDbFile("Accounts.txt", accountsToList)).MustHaveHappened(); // A.CallTo(() => _dbTxtFileWriter.WriteDbFile("Transactions.txt", transactionsToList)).MustHaveHappened(); A.CallTo(() => _dbTxtFileWriter.WriteDbFile("Transactions.txt", transToList)).MustHaveHappened(); A.CallTo(() => _dbTxtFileWriter.WriteDbFile("ArticlesAssociations.txt", associationsToList)).MustHaveHappened(); A.CallTo(() => _dbTxtFileWriter.WriteDbFile("CurrencyRates.txt", ratesToList)).MustHaveHappened(); }
public void SaveDbInTxt() { _dbTxtFileWriter.WriteDbFile("Accounts.txt", _dbEntriesToStringListsConverter.ConvertAccountsToFileContent()); _dbTxtFileWriter.WriteDbFile("TransWithTags.txt", _dbEntriesToStringListsConverter.ConvertTranWithTagsToFileContent()); _dbTxtFileWriter.WriteDbFile("ArticlesAssociations.txt", _dbEntriesToStringListsConverter.ConvertArticlesAssociationsToFileContent()); _dbTxtFileWriter.WriteDbFile("CurrencyRates.txt", _dbEntriesToStringListsConverter.ConvertCurrencyRatesToFileContent()); _dbTxtFileWriter.WriteDbFile("OfficialRates.txt", _dbEntriesToStringListsConverter.ConvertOfficialRatesToFileContent()); _dbTxtFileWriter.WriteDbFile("BankDepositOffers.txt", _dbEntriesToStringListsConverter.ConvertBankDepositOffersToFileContent()); _dbTxtFileWriter.WriteDbFile("BankDepositOffersRates.txt", _dbEntriesToStringListsConverter.ConvertBankDepositOffersRatesToFileContent()); _dbTxtFileWriter.WriteDbFile("Deposits.txt", _dbEntriesToStringListsConverter.ConvertDepositsToFileContent()); }