Exemple #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");
    }
Exemple #2
0
 /// <inheritdoc />
 public ExistingMealTypeDto CreateMealType(NewMealTypeDto newArticleGroupDto)
 {
     return(SimpleCrudHelper.Create <NewMealTypeDto, MealType, ExistingMealTypeDto>(newArticleGroupDto));
 }