コード例 #1
0
        public async Task GetByIdAsync_CreateAndGet_LockReturned()
        {
            // Arrage
            var @lock   = _fixure.Create <Locks.Entities.Lock>();
            var created = await _repository.TryCreateAsync(@lock, _userId);

            // Act
            var result = await _repository.GetByIdAsync(created.Id, _userId);

            // Assert
            result.Should().BeEquivalentTo(created, opt => opt.WithStrictOrdering());
        }
コード例 #2
0
ファイル: LocksService.cs プロジェクト: Nero0909/LuckyLock
 public Task <Lock> GetByIdAsync(Guid id, string userId)
 {
     return(_locksRepository.GetByIdAsync(id, userId));
 }