コード例 #1
0
        public async Task CreateEffectSubCategory_AddANewEffectSubCategoryInDatabase()
        {
            var expectedEffectSubCategory = CreateEffectSubCategory();

            expectedEffectSubCategory.Effects = new List <Effect>();
            var createEffectSubCategoryRequest = AutoFill <CreateEffectSubCategoryRequest> .One();

            var effectSubCategory = await _effectService.CreateEffectSubCategoryAsync(new NaheulbookExecutionContext(), createEffectSubCategoryRequest);

            Received.InOrder(() =>
            {
                _effectSubCategoryRepository.Add(effectSubCategory);
                _unitOfWork.SaveChangesAsync();
            });
            effectSubCategory.Should().BeEquivalentTo(expectedEffectSubCategory);
        }