Exemplo n.º 1
0
        public CategoryController(Lazy<IUnitOfWork> unitOfWorkFactory, ICategoryConverter categoryConverter)
        {
            Contract.Requires<ArgumentNullException>(unitOfWorkFactory != null);
            Contract.Requires<ArgumentNullException>(categoryConverter != null);

            _unitOfWorkFactory = unitOfWorkFactory;
            _categoryConverter = categoryConverter;
        }
Exemplo n.º 2
0
 public CategoryController(ICategoryService categoryService, ICategoryConverter categoryConverter)
 {
     _categoryService   = categoryService ?? throw new ArgumentNullException(nameof(categoryService));
     _categoryConverter = categoryConverter ?? throw new ArgumentNullException(nameof(categoryConverter));
 }
Exemplo n.º 3
0
 public ControllerListTest()
 {
     _categoryService    = A.Fake <ICategoryService>();
     _categoryConverter  = A.Fake <ICategoryConverter>();
     _categoryController = new CategoryController(_categoryService, _categoryConverter);
 }