public async Task Save_ShouldThrow_GivenMappingDoesNotMapAllTransactions()
{
var mapper = new Mock<IDtoMapper<TransactionSetDto, StatementModel>>();
var subject = ArrangeWithMockMappers(mapper.Object);
var model = StatementModelTestData.TestData2();
model.Filter(new GlobalFilterCriteria { BeginDate = new DateTime(2013, 07, 20), EndDate = new DateTime(2013, 08, 19) });
mapper.Setup(m => m.ToDto(model)).Returns(
new TransactionSetDto
{
StorageKey = "Foo.bar",
LastImport = new DateTime(2013, 07, 20),
Transactions = TransactionSetDtoTestData.TestData2().Transactions.Take(2).ToList()
});
await subject.SaveAsync(model, "Foo.bar", false);
Assert.Fail();
}