Exemple #1
0
    public void CreateArticleGroup()
    {
        using var context = new InMemoryDbContext();
        var testee             = new ArticleGroupService(new SimpleCrudHelper(context, TestMapper.Create()));
        var newArticleGroupDto = new NewArticleGroupDto("Vegetables");

        testee.CreateArticleGroup(newArticleGroupDto);

        context.ArticleGroups.Should().Contain(x => x.Name == "Vegetables");
    }
 /// <inheritdoc />
 public ExistingArticleGroupDto CreateArticleGroup(NewArticleGroupDto newArticleGroupDto)
 {
     return(SimpleCrudHelper.Create <NewArticleGroupDto, ArticleGroup, ExistingArticleGroupDto>(newArticleGroupDto));
 }