Exemplo n.º 1
0
        public DietTests()
        {
            var mockMapper = new MapperConfiguration(cfg =>
            {
                cfg.AddProfile(new AutoMapping());
            });

            _mapper         = mockMapper.CreateMapper();
            _dietRepository = new Mock <IDietRepository>();
            _planRepository = new Mock <IPlanRepository>();
            _dietService    = new DietService(_dietRepository.Object, _planRepository.Object);
            _controller     = new DietController(_dietService, _mapper);
        }
Exemplo n.º 2
0
 public void SetDietController(DietController dietController)
 {
     _dietController = dietController;
 }