public async void Get_NonExistingId_ReturnsNull() { // Arrange var options = Arrange.NewMemoryDBWithTestData(); using (var context = new CeloPracticalChallengeDBContext(options)) { var userRepository = new RandomUserRepository(context); // Act var user = await userRepository.GetAsync(999); // Assert Assert.Null(user); } }
public async void Get_IdTwo_ReturnsIdTwo() { // Arrange var options = Arrange.NewMemoryDBWithTestData(); using (var context = new CeloPracticalChallengeDBContext(options)) { var userRepository = new RandomUserRepository(context); // Act var user = await userRepository.GetAsync(2); // Assert Assert.Equal(2, user.Id); } }