public async Task CreateEffect_AddANewEffectInDatabase() { var expectedEffect = CreateEffect(subCategoryId: 2); var createEffectRequest = AutoFill <CreateEffectRequest> .One(); var executionContext = new NaheulbookExecutionContext(); var effect = await _effectService.CreateEffectAsync(executionContext, 2, createEffectRequest); Received.InOrder(() => { _effectRepository.Add(effect); _unitOfWork.SaveChangesAsync(); }); effect.Should().BeEquivalentTo(expectedEffect); }