public async Task CreateAsync_NotNullModel_Created() { // Arrage var @lock = _fixure.Create <Locks.Entities.LockTag>(); @lock.CreatedBy = _userId; // Act var result = await _repository.TryCreateAsync(@lock, _userId); // Assert result.Should().BeEquivalentTo(@lock, opt => opt.WithStrictOrdering()); }
public async Task <LockTag> CreateLink(LockTag link, string userId) { var entity = await _locksTagsRepository.TryCreateAsync(link, userId).ConfigureAwait(false); if (entity != null) { await _eventPublisher.SendTagLinkedMessageAsync(entity, userId).ConfigureAwait(false); } return(entity); }