示例#1
0
    public void CreateMealType()
    {
        using var context = new InMemoryDbContext();
        var testee         = new MealTypeService(new SimpleCrudHelper(context, TestMapper.Create()));
        var newMealTypeDto = new NewMealTypeDto("Lunch");

        testee.CreateMealType(newMealTypeDto);

        context.MealTypes.Should().Contain(x => x.Name == "Lunch");
    }
示例#2
0
 /// <inheritdoc />
 public ExistingMealTypeDto CreateMealType(NewMealTypeDto newArticleGroupDto)
 {
     return(SimpleCrudHelper.Create <NewMealTypeDto, MealType, ExistingMealTypeDto>(newArticleGroupDto));
 }