public void When_filtering_for_negative_records_all_are_converted_to_positive() { // Arrange var file_io = new FileIO <ActualBankRecord>(new FakeSpreadsheetRepoFactory(), _csv_file_path, "ActualBank-sample"); var csv_file = new CSVFile <ActualBankRecord>(file_io); csv_file.Load(); // Act csv_file.Filter_for_negative_records_only(); // Assert Assert.AreEqual(115.30, csv_file.Records[50].Amount); }
public void Can_filter_for_negative_records_only() { // Arrange var file_io = new FileIO <ActualBankRecord>(new FakeSpreadsheetRepoFactory(), _csv_file_path, "ActualBank-sample"); var csv_file = new CSVFile <ActualBankRecord>(file_io); csv_file.Load(); // Act csv_file.Filter_for_negative_records_only(); // Assert Assert.AreEqual("'DIVIDE YOUR GREEN", csv_file.Records[0].Description); Assert.AreEqual(51, csv_file.Records.Count); Assert.AreEqual(4554.18, csv_file.Records[50].Balance); }