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