コード例 #1
0
ファイル: CategoryController.cs プロジェクト: Jork/Billboard
        public CategoryController(Lazy<IUnitOfWork> unitOfWorkFactory, ICategoryConverter categoryConverter)
        {
            Contract.Requires<ArgumentNullException>(unitOfWorkFactory != null);
            Contract.Requires<ArgumentNullException>(categoryConverter != null);

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