public CategoryController(Lazy<IUnitOfWork> unitOfWorkFactory, ICategoryConverter categoryConverter) { Contract.Requires<ArgumentNullException>(unitOfWorkFactory != null); Contract.Requires<ArgumentNullException>(categoryConverter != null); _unitOfWorkFactory = unitOfWorkFactory; _categoryConverter = categoryConverter; }
public CategoryController(ICategoryService categoryService, ICategoryConverter categoryConverter) { _categoryService = categoryService ?? throw new ArgumentNullException(nameof(categoryService)); _categoryConverter = categoryConverter ?? throw new ArgumentNullException(nameof(categoryConverter)); }
public ControllerListTest() { _categoryService = A.Fake <ICategoryService>(); _categoryConverter = A.Fake <ICategoryConverter>(); _categoryController = new CategoryController(_categoryService, _categoryConverter); }