public async Task ShouldGetById() { var repo = new FundManagerMemoryDb(); var firstItem = (await repo.GetAll()).First(); var result = await repo.GetBy(firstItem.Id); Assert.That(result, Is.EqualTo(firstItem)); }
public async Task ShouldUpdateItem() { var repo = new FundManagerMemoryDb(); var firstItem = (await repo.GetAll()).First(); firstItem.Name = "NewName"; repo.Update(firstItem.Id, firstItem); Assert.That((await repo.GetBy(firstItem.Id)).Name, Is.EqualTo("NewName")); }