public GatewayController(IConfiguration configuration, IThingService thingService, IProductionOrderService productionOrderService, IRecipeService recipeService) { _configuration = configuration; _thingService = thingService; _productionOrderService = productionOrderService; _recipeService = recipeService; }
/// <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; }
public ProductionOrderService(ApplicationDbContext context, IRecipeService recipeService, IProductionOrderTypeService productionOrderTypeService, IThingService thingService) { _context = context; _recipeService = recipeService; _productionOrderTypeService = productionOrderTypeService; _thingService = thingService; }
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); }
public void SetUp() { thingService = A.Fake <IThingService>(); thingCache = new ThingCache(thingService); thing1 = new Thing(thingId1); thing2 = new Thing(thingId2); }
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>(); }
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); }
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); }
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);; }
public GatewayController(IConfiguration configuration, IThingService thingService, IThingGroupService thingGroupService, IProductService productService, ITagsService tagsService ) { _configuration = configuration; _thingService = thingService; _thingGroupService = thingGroupService; _productService = productService; _tagsService = tagsService; }
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; }
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); }
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); }
public void SetUp() { thingService = A.Fake <IThingService>(); thingCache = new ThingCache(thingService); }
public HistoryLogController(tirotdbContext context, IThingService thingService) { _context = context; _thingService = thingService; }
public ThingController(IThingService thingService) { _thingService = thingService; }
public GatewayController(IConfiguration configuration, IThingService thingService) { _configuration = configuration; _thingService = thingService; }
public CreateThingConsumer(ILogger <CreateThingConsumer> logger, IThingService thingService) { _logger = logger; _thingService = thingService; }
public ThingAction() { this.thingService = (IThingService)GetObject("ThingService"); }
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>(); }
public ThingStatusService(ApplicationDbContext context, IThingService thingService) { _context = context; _thingService = thingService; }
public ActivityLogController(tirotdbContext context, IThingService thingService) { _context = context; _thingService = thingService; }
public WISE_SeriesController(tirotdbContext context, IThingService thingService) { _context = context; _thingService = thingService; }
public MasterController(tirotdbContext context, IThingService thingService) { _context = context; _thingService = thingService; // GET: api/values }
public ThingCache(IThingService thingService) { this.thingService = thingService; }
public void TearDown() { thingService = null; thingCache = null; }
/// <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; }
public ThingsController(ILogger <ThingsController> logger, IThingService thingService) { _logger = logger; _thingService = thingService; }
public void SetUp() { _mockRepository = new MockRepository(); _thingRepository = _mockRepository.DynamicMock<IRepository<Thing>>(); _thingStateRepository = _mockRepository.DynamicMock<IRepository<ThingState>>(); _thingService = new ThingService(_thingRepository, _thingStateRepository); }