public async Task GetByUserAsync_CreateAndGet_LocksReturned() { // Arrage var firstLock = _fixure.Create <Locks.Entities.Lock>(); var secondLock = _fixure.Create <Locks.Entities.Lock>(); var userId = Guid.NewGuid().ToString(); var first = await _repository.TryCreateAsync(firstLock, userId); var second = await _repository.TryCreateAsync(secondLock, userId); // Act var result = await _repository.GetByUserAsync(userId); // Assert result.Should().BeEquivalentTo(first, second); }
public Task <IEnumerable <Lock> > GetByUserAsync(string userId) { return(_locksRepository.GetByUserAsync(userId)); }