public async Task GetAsync_WillReturnNull_WhenNotExists(int iteration) { // Arrange sut = new MoamrathRepository(_db); // Act Moamrath result = await sut.GetAsync(Guid.NewGuid()); // Assert Assert.Null(result); }
public async Task GetAsyncMultiple_WillReturnAllMatchingEntities(params Guid[] ids) { // Arrange sut = new MoamrathRepository(_db); // Act IEnumerable <Moamrath> result = await sut.GetAsync(ids); // Assert Assert.NotEmpty(result); Assert.Equal(ids.Length, result.Count()); }
public async Task GetAsyncMultiple_WillReturnOnlyThoseWithMatchingKeys(string id1, string id2) { // Arrange sut = new MoamrathRepository(_db); // Act IEnumerable <Moamrath> result = await sut.GetAsync(Guid.Parse(id1), Guid.Parse(id2), Guid.NewGuid()); // Assert Assert.NotEmpty(result); Assert.Equal(2, result.Count()); }
public async Task GetAsync_WillReturnTheCorrectValue_WhenExists(string id) { // Arrange sut = new MoamrathRepository(_db); // Act Moamrath result = await sut.GetAsync(Guid.Parse(id)); // Assert Assert.NotNull(result); Assert.Equal(Guid.Parse(id), result.Id); }