Exemplo n.º 1
0
 public GatewayController(IConfiguration configuration, IThingService thingService, IProductionOrderService productionOrderService, IRecipeService recipeService)
 {
     _configuration          = configuration;
     _thingService           = thingService;
     _productionOrderService = productionOrderService;
     _recipeService          = recipeService;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="context">Context DB</param>
 public ToolService(ApplicationDbContext context, IToolTypeService toolTypeService,
                    IThingService thingService)
 {
     _context         = context;
     _toolTypeService = toolTypeService;
     _thingService    = thingService;
 }
 public AlarmService(IThingService thingservice, ApplicationDbContext context, IHistorianAlarmsService historianService, IConfiguration configuration)
 {
     _context          = context;
     _historianService = historianService;
     _configuration    = configuration;
     _thingservice     = thingservice;
 }
Exemplo n.º 4
0
 public ProductionOrderService(ApplicationDbContext context, IRecipeService recipeService,
                               IProductionOrderTypeService productionOrderTypeService, IThingService thingService)
 {
     _context       = context;
     _recipeService = recipeService;
     _productionOrderTypeService = productionOrderTypeService;
     _thingService = thingService;
 }
Exemplo n.º 5
0
 public void SetUp()
 {
     thingService = A.Fake <IThingService>();
     A.CallTo(() => thingService.TryRead(thingId1, out thing1)).Returns(true);
     A.CallTo(() => thingService.TryRead(thingId2, out thing2)).Returns(true);
     A.CallTo(() => thingService.TryRead(thingIdNotExisted, out thing3)).Returns(false);
     thingCache = new ThingCache(thingService);
 }
Exemplo n.º 6
0
        public void SetUp()
        {
            thingService = A.Fake <IThingService>();
            thingCache   = new ThingCache(thingService);

            thing1 = new Thing(thingId1);
            thing2 = new Thing(thingId2);
        }
Exemplo n.º 7
0
 public ThingFacadeService(
     IRepository <Thing, int> repository,
     ITransactionManager transactionManager,
     IBuilder <Thing> resourceBuilder,
     IThingService domainService)
     : base(repository, transactionManager, resourceBuilder)
 {
     this.domainService = domainService;
 }
        public void SetUp()
        {
            _mockRepository = new MockRepository();
            _thingService = _mockRepository.DynamicMock<IThingService>();

            _thingController = new ThingController(_thingService);
            Mapper.CreateMap<Thing, ThingModel>();
            Mapper.CreateMap<ThingModel, Thing>();
        }
Exemplo n.º 9
0
 public void Configure()
 {
     service = A.Fake <IThingService>();
     cache   = new ThingCache(service);
     A.CallTo(() => service.TryRead(A <string> .Ignored, out thing1)).Returns(false);
     A.CallTo(() => service.TryRead(thingKey1, out thing1))
     .Returns(true);
     A.CallTo(() => service.TryRead(thingKey2, out thing2))
     .Returns(true);
 }
Exemplo n.º 10
0
 public ThingModule(IFacadeResourceService <Thing, int, ThingResource, ThingResource> thingFacadeService, IThingService thingService)
 {
     this.thingFacadeService = thingFacadeService;
     this.thingService       = thingService;
     this.Get("/template/things", this.GetThings);
     this.Get("/template/things/{id:int}", this.GetThingById);
     this.Post("/template/things/{id:int}", this.DoNothing);
     this.Post("/template/things/send-message", this.SendMessage);
     this.Post("/template/things", this.CreateThing);
     this.Put("/template/things/{id:int}", this.UpdateThing);
 }
Exemplo n.º 11
0
        public void SetUp()
        {
            thingService = A.Fake <IThingService>();
            thingCache   = new ThingCache(thingService);
            Thing thing;

            A.CallTo(() => thingService.TryRead(A <string> .Ignored, out thing)).Returns(false);
            A.CallTo(() => thingService.TryRead(thingId1, out thing)).Returns(true)
            .AssignsOutAndRefParameters(thing1);

            A.CallTo(() => thingService.TryRead(thingId2, out thing)).Returns(true)
            .AssignsOutAndRefParameters(thing2);;
        }
Exemplo n.º 12
0
 public GatewayController(IConfiguration configuration,
                          IThingService thingService,
                          IThingGroupService thingGroupService,
                          IProductService productService,
                          ITagsService tagsService
                          )
 {
     _configuration     = configuration;
     _thingService      = thingService;
     _thingGroupService = thingGroupService;
     _productService    = productService;
     _tagsService       = tagsService;
 }
Exemplo n.º 13
0
 public ThingController(
     IThingService thingService,
     ITagService tagService,
     IMaterialService materialService,
     IFormatService formatService,
     IStateService stateService,
     IUserService userService)
 {
     _thingService = thingService;
     _tagService = tagService;
     _materialService = materialService;
     _formatService = formatService;
     _stateService = stateService;
     _userService = userService;
 }
Exemplo n.º 14
0
        public void SetUp()
        {
            thingService = A.Fake <IThingService>();
            thingCache   = new ThingCache(thingService);

            Thing _ = null;

            A.CallTo(() => thingService.TryRead(thingId1, out _))
            .Returns(true)
            .AssignsOutAndRefParameters(thing1);

            A.CallTo(() => thingService.TryRead(thingId2, out _))
            .Returns(true)
            .AssignsOutAndRefParameters(thing2);
        }
Exemplo n.º 15
0
        public void EstablishContext()
        {
            this.TransactionManager = Substitute.For <ITransactionManager>();
            this.FacadeService      = Substitute.For <IFacadeResourceService <Thing, int, ThingResource, ThingResource> >();
            this.ThingService       = Substitute.For <IThingService>();
            this.Log = Substitute.For <ILog>();

            this.Client = TestClient.With <ThingModule>(
                services =>
            {
                services.AddSingleton(this.TransactionManager);
                services.AddSingleton(this.FacadeService);
                services.AddSingleton(this.Log);
                services.AddSingleton(this.ThingService);
                services.AddHandlers();
            },
                FakeAuthMiddleware.EmployeeMiddleware);
        }
Exemplo n.º 16
0
 public void SetUp()
 {
     thingService = A.Fake <IThingService>();
     thingCache   = new ThingCache(thingService);
 }
Exemplo n.º 17
0
 public HistoryLogController(tirotdbContext context, IThingService thingService)
 {
     _context      = context;
     _thingService = thingService;
 }
Exemplo n.º 18
0
 public ThingController(IThingService thingService)
 {
     _thingService = thingService;
 }
 public GatewayController(IConfiguration configuration, IThingService thingService)
 {
     _configuration = configuration;
     _thingService  = thingService;
 }
Exemplo n.º 20
0
 public CreateThingConsumer(ILogger <CreateThingConsumer> logger, IThingService thingService)
 {
     _logger       = logger;
     _thingService = thingService;
 }
Exemplo n.º 21
0
 public ThingAction()
 {
     this.thingService = (IThingService)GetObject("ThingService");
 }
Exemplo n.º 22
0
        public void SetUp()
        {
            _mockRepository = new MockRepository();
            _thingService = _mockRepository.DynamicMock<IThingService>();
            _tagService = _mockRepository.DynamicMock<ITagService>();
            _materialService = _mockRepository.DynamicMock<IMaterialService>();
            _formatService = _mockRepository.DynamicMock<IFormatService>();
            _stateService = _mockRepository.DynamicMock<IStateService>();
            _userService = _mockRepository.DynamicMock<IUserService>();

            _thingController = new ThingController(
                _thingService,
                _tagService,
                _materialService,
                _formatService,
                _stateService,
                _userService);

            Mapper.CreateMap<Thing, ThingModel>();
            Mapper.CreateMap<ThingModel, Thing>();
        }
Exemplo n.º 23
0
 public ThingStatusService(ApplicationDbContext context, IThingService thingService)
 {
     _context      = context;
     _thingService = thingService;
 }
Exemplo n.º 24
0
 public ActivityLogController(tirotdbContext context, IThingService thingService)
 {
     _context      = context;
     _thingService = thingService;
 }
Exemplo n.º 25
0
 public WISE_SeriesController(tirotdbContext context, IThingService thingService)
 {
     _context      = context;
     _thingService = thingService;
 }
Exemplo n.º 26
0
 public MasterController(tirotdbContext context, IThingService thingService)
 {
     _context      = context;
     _thingService = thingService;
     // GET: api/values
 }
Exemplo n.º 27
0
 public ThingCache(IThingService thingService)
 {
     this.thingService = thingService;
 }
Exemplo n.º 28
0
 public void TearDown()
 {
     thingService = null;
     thingCache   = null;
 }
Exemplo n.º 29
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ThingController"/> class.
 /// </summary>
 /// <param name="documentSession">The document session.</param>
 /// <param name="thingService">The thing service.</param>
 public ThingController(IDocumentSession documentSession, IThingService thingService, IUserService userService)
     : base(documentSession)
 {
     this._thingService = thingService;
     this._userService = userService;
 }
Exemplo n.º 30
0
 public ThingsController(ILogger <ThingsController> logger, IThingService thingService)
 {
     _logger       = logger;
     _thingService = thingService;
 }
Exemplo n.º 31
0
 public ThingController(IThingService thingService)
 {
     _thingService = thingService;
 }
Exemplo n.º 32
0
        public void SetUp()
        {
            _mockRepository = new MockRepository();
            _thingRepository = _mockRepository.DynamicMock<IRepository<Thing>>();
            _thingStateRepository = _mockRepository.DynamicMock<IRepository<ThingState>>();

            _thingService = new ThingService(_thingRepository, _thingStateRepository);
        }