public void RenderFile_should_return_correct_string() { //arrange //int size = 940; //int size1 = 1880; var target = new NachaFile(new NachaFileInfo { BatchNumber = 12, CreationDate = new DateTime(2012, 07, 30, 12, 24, 1), CompanyDescriptiveDate = new DateTime(2010, 07, 29, 10, 24, 1), EffectiveEntryDate = new DateTime(2012, 10, 08, 02, 04, 1), FileIdModifier = "A" }, new List<NachaFileAppraiserEntry> { new NachaFileAppraiserEntry { AccountNumber = "123445", Amount = 10000.0, AppraiserOrCompanyId = "123456", AppraiserOrCompanyName = "FIRST APP COMPANY", RoutingNumber = "000345001", TypeOfAccount = AccountType.Checking, UniqueTraceNumber = 1 } }); //act var actual = target.RenderNachaFile(); //assert actual.Should().Be("101b121144557P4537372771207301224A094101SIERRA VISTA BANK DIRECT VALUATION SOLUTI000000005200DIRECT VAL SOL APPRAISER DISBURSE 1453737277CCDAPPRAISAL 100729121008 1121144550000012622000345001123445 0001000000AU0000000123456FIRST APP COMPANY 0121144550000001820000000100000345000000000000000000010000001453737277 1211445500000129000001000001000000010000034500000000000000000001000000 99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999"); }
public void RenderFile_should_return_correct_string_length() { //arrange int size = 940; int size1 = 1880; var target = new NachaFile(new NachaFileInfo { BatchNumber = 12, CreationDate = new DateTime(2012, 07, 30, 12, 24, 1), CompanyDescriptiveDate = new DateTime(2010, 07, 29, 10, 24, 1), EffectiveEntryDate = new DateTime(2012, 10, 08, 02, 04, 1), FileIdModifier = "A" }, new List<NachaFileAppraiserEntry> { new NachaFileAppraiserEntry { AccountNumber = "123445", Amount = 100000.0, AppraiserOrCompanyId = "123456", AppraiserOrCompanyName = "first app company", RoutingNumber = "000345001", TypeOfAccount = AccountType.Checking, UniqueTraceNumber = 1 } }); var target1 = new NachaFile(new NachaFileInfo { BatchNumber = 12, CreationDate = new DateTime(2012, 07, 30, 12, 24, 1), CompanyDescriptiveDate = new DateTime(2010, 07, 29, 10, 24, 1), EffectiveEntryDate = new DateTime(2012, 10, 08, 02, 04, 1), FileIdModifier = "A" }, new List<NachaFileAppraiserEntry> { new NachaFileAppraiserEntry { AccountNumber = "123445", Amount = 100000.0, AppraiserOrCompanyId = "123456", AppraiserOrCompanyName = "first app company", RoutingNumber = "000345001", TypeOfAccount = AccountType.Checking, UniqueTraceNumber = 1 }, new NachaFileAppraiserEntry { AccountNumber = "123445", Amount = 100000.0, AppraiserOrCompanyId = "123456", AppraiserOrCompanyName = "first app company", RoutingNumber = "000345001", TypeOfAccount = AccountType.Checking, UniqueTraceNumber = 2 }, new NachaFileAppraiserEntry { AccountNumber = "123445", Amount = 100000.0, AppraiserOrCompanyId = "123456", AppraiserOrCompanyName = "first app company", RoutingNumber = "000345001", TypeOfAccount = AccountType.Checking, UniqueTraceNumber = 3 }, new NachaFileAppraiserEntry { AccountNumber = "123445", Amount = 100000.0, AppraiserOrCompanyId = "123456", AppraiserOrCompanyName = "first app company", RoutingNumber = "000345001", TypeOfAccount = AccountType.Checking, UniqueTraceNumber = 4 }, new NachaFileAppraiserEntry { AccountNumber = "123445", Amount = 100000.0, AppraiserOrCompanyId = "123456", AppraiserOrCompanyName = "first app company", RoutingNumber = "000345001", TypeOfAccount = AccountType.Checking, UniqueTraceNumber = 5 }, new NachaFileAppraiserEntry { AccountNumber = "123445", Amount = 100000.0, AppraiserOrCompanyId = "123456", AppraiserOrCompanyName = "first app company", RoutingNumber = "000345001", TypeOfAccount = AccountType.Checking, UniqueTraceNumber = 6 }, new NachaFileAppraiserEntry { AccountNumber = "123445", Amount = 100000.0, AppraiserOrCompanyId = "123456", AppraiserOrCompanyName = "first app company", RoutingNumber = "000345001", TypeOfAccount = AccountType.Checking, UniqueTraceNumber = 7 } }); var target2 = new NachaFile(new NachaFileInfo { BatchNumber = 12, CreationDate = new DateTime(2012, 07, 30, 12, 24, 1), CompanyDescriptiveDate = new DateTime(2010, 07, 29, 10, 24, 1), EffectiveEntryDate = new DateTime(2012, 10, 08, 02, 04, 1), FileIdModifier = "A" }, new List<NachaFileAppraiserEntry> { new NachaFileAppraiserEntry { AccountNumber = "123445", Amount = 100000.0, AppraiserOrCompanyId = "123456", AppraiserOrCompanyName = "first app company", RoutingNumber = "000345001", TypeOfAccount = AccountType.Checking, UniqueTraceNumber = 1 }, new NachaFileAppraiserEntry { AccountNumber = "123445", Amount = 100000.0, AppraiserOrCompanyId = "123456", AppraiserOrCompanyName = "first app company", RoutingNumber = "000345001", TypeOfAccount = AccountType.Checking, UniqueTraceNumber = 2 }, new NachaFileAppraiserEntry { AccountNumber = "123445", Amount = 100000.0, AppraiserOrCompanyId = "123456", AppraiserOrCompanyName = "first app company", RoutingNumber = "000345001", TypeOfAccount = AccountType.Checking, UniqueTraceNumber = 3 }, new NachaFileAppraiserEntry { AccountNumber = "123445", Amount = 100000.0, AppraiserOrCompanyId = "123456", AppraiserOrCompanyName = "first app company", RoutingNumber = "000345001", TypeOfAccount = AccountType.Checking, UniqueTraceNumber = 4 }, new NachaFileAppraiserEntry { AccountNumber = "123445", Amount = 100000.0, AppraiserOrCompanyId = "123456", AppraiserOrCompanyName = "first app company", RoutingNumber = "000345001", TypeOfAccount = AccountType.Checking, UniqueTraceNumber = 5 }, new NachaFileAppraiserEntry { AccountNumber = "123445", Amount = 100000.0, AppraiserOrCompanyId = "123456", AppraiserOrCompanyName = "first app company", RoutingNumber = "000345001", TypeOfAccount = AccountType.Checking, UniqueTraceNumber = 6 } }); //act var actual = target.RenderNachaFile(); var actual1 = target1.RenderNachaFile(); var actual2 = target2.RenderNachaFile(); //assert actual.Length.Should().Be(size); actual1.Length.Should().Be(size1); actual2.Length.Should().Be(size); }