public void DeleteInvestment() { dataProvider.AddCashMovement(01.01.of2009(), 1, "1"); dataProvider.AddCashMovement(01.01.of2009(), 2, "2"); var investment1 = dataProvider.GetCashMovements().Single(x => x.Amount == 1); var investment2 = dataProvider.GetCashMovements().Single(x => x.Amount == 2); dataProvider.DeleteCashMovement(investment1); persistentStorageMock.Verify(x => x.Set(dataContainer), Times.Exactly(3)); CollectionAssert.AreEqual( new[] { investment2 }, dataProvider.GetCashMovements()); }
public void CashMovementsAreCopied() { dataProvider.AddCashMovement(1.02.of2009(), 10, "expense"); // var preprocessor = CreatePreprocessor(); CollectionAssert.AreEquivalent(dataProvider.GetCashMovements(), preprocessor.CashMovements); }