Exemplo n.º 1
0
 public CategoryController(
     IAddCategoryUseCase addCategoryUseCase,
     IRemoveCategoryUseCase removeCategoryUseCase,
     IUpdateCategoryUseCase updateCategoryUseCase,
     IGetAllCategoryUseCase getAllCategoryUseCase,
     IGetByIdCategoryUseCase getByIdCategoryUseCase)
 {
     this.addCategoryUseCase     = addCategoryUseCase;
     this.removeCategoryUseCase  = removeCategoryUseCase;
     this.updateCategoryUseCase  = updateCategoryUseCase;
     this.getAllCategoryUseCase  = getAllCategoryUseCase;
     this.getByIdCategoryUseCase = getByIdCategoryUseCase;
 }
Exemplo n.º 2
0
 public CategoryControllerTest(Fixed.Fixture fixture)
 {
     this.addCategoryUseCase    = fixture.Container.Resolve <IAddCategoryUseCase>();
     this.removeCategoryUseCase = fixture.Container.Resolve <IRemoveCategoryUseCase>();
     this.updateCategoryUseCase = fixture.Container.Resolve <IUpdateCategoryUseCase>();
     this.getAllCategoryUseCase = fixture.Container.Resolve <IGetAllCategoryUseCase>();
     this.byIdCategoryUseCase   = fixture.Container.Resolve <IGetByIdCategoryUseCase>();
     this.category           = new Category("Ciencia");
     this.guid               = new Guid();
     this.categoryController = new CategoryController(addCategoryUseCase,
                                                      removeCategoryUseCase,
                                                      updateCategoryUseCase,
                                                      getAllCategoryUseCase,
                                                      byIdCategoryUseCase);
 }
Exemplo n.º 3
0
        public TopicControllerTest(Fixed.Fixture fixture)
        {
            this.addTopicUseCase     = fixture.Container.Resolve <IAddTopicUseCase>();
            this.addCategoryUseCase  = fixture.Container.Resolve <IAddCategoryUseCase>();
            this.updateTopicUseCase  = fixture.Container.Resolve <IUpdateTopicUseCase>();
            this.removeTopicUseCase  = fixture.Container.Resolve <IRemoveTopicUseCase>();
            this.getAllTopicUseCase  = fixture.Container.Resolve <IGetAllTopicUseCase>();
            this.getByIdTopicUseCase = fixture.Container.Resolve <IGetByIdTopicUseCase>();
            this.category            = new Category("Teste1");
            this.topic           = new Topic("Topic1", category);
            this.guid            = new Guid();
            this.topicController = new TopicController(addTopicUseCase,
                                                       getAllTopicUseCase,
                                                       getByIdTopicUseCase,
                                                       updateTopicUseCase,
                                                       removeTopicUseCase,
                                                       getByIdCategoryUseCase,
                                                       getByIdUserUseCase

                                                       );
        }