public void RemoveAtEmptyList() { var list = new TransactionListTestClass(); Action a = () => list.RemoveAt(1); a.Should().Throw <ArgumentOutOfRangeException>(); }
public void RemoveAtMiddleEntry() { var list = new TransactionListTestClass(); list.Add(Guid.NewGuid(), new Date(2000, 01, 01)); list.Add(Guid.NewGuid(), new Date(2001, 01, 01)); list.Add(Guid.NewGuid(), new Date(2002, 01, 01)); list.RemoveAt(1); var result = list.Select(x => x.Date).ToArray(); result.Should().Equal(new Date[] { new Date(2000, 01, 01), new Date(2002, 01, 01) }); }