public TicketController(ITicketsService ticketsService, IStatusesService statusesService, UserManager <User> userManager, IUsersService usersService) { this.ticketsService = ticketsService; this.statusesService = statusesService; this.userManager = userManager; this.usersService = usersService; }
//Custom Code End //Custom Code Start | Replaced Code Block //Replaced Code Block Start //public PickBatchesController(IPickBatchesService pickbatchesService) //Replaced Code Block End public PickBatchesController(IPickBatchesService pickbatchesService, Inventory inventory, IStatusesService statusesService, IOutboundOrdersService outboundordersService, Picking picking) //Custom Code End { _pickbatchesService = pickbatchesService; _inventory = inventory; _statusesService = statusesService; _outboundordersService = outboundordersService; _picking = picking; }
public async Task GetAll_WithZeroData_ShouldReturnEmptyResults() { string errorMessagePrefix = "StatusesService GetAllStatuses() method does not work properly."; var context = OmmDbContextInMemoryFactory.InitializeContext(); this.statusesService = new StatusesService(context); List <StatusListDto> actualResults = await this.statusesService.GetAllStatuses().ToListAsync(); Assert.True(actualResults.Count == 0, errorMessagePrefix + " " + "Count of returned statuses is not correct"); }
public async Task GetStatusNameByIdAsync_WithInvalidId_ShouldThrowArgumentOutOfRangeException(int id) { var context = OmmDbContextInMemoryFactory.InitializeContext(); await SeedData(context); this.statusesService = new StatusesService(context); var ex = await Assert.ThrowsAsync <ArgumentOutOfRangeException>(() => this.statusesService.GetStatusNameByIdAsync(id)); Assert.Equal(string.Format(ErrorMessages.StatusInvalidRange, id), ex.Message); }
public ProjectsService(OmmDbContext context, IReportsService reportsService, IStatusesService statusesService, IEmployeesService employeesService, IProjectPositionsService projectPositionsService, IEmployeesProjectsPositionsService employeesProjectsPositionsService, IAssignmentsService assignmentsService) { this.context = context; this.reportsService = reportsService; this.statusesService = statusesService; this.employeesService = employeesService; this.projectPositionsService = projectPositionsService; this.employeesProjectsPositionsService = employeesProjectsPositionsService; this.assignmentsService = assignmentsService; }
public async Task GetStatusIdByNameAsync_WithInvalidName_ShouldThrowNullReferenceException() { var context = OmmDbContextInMemoryFactory.InitializeContext(); await SeedData(context); this.statusesService = new StatusesService(context); var ex = await Assert.ThrowsAsync <NullReferenceException>(() => this.statusesService.GetStatusIdByNameAsync(Invalid_Status_Name)); Assert.Equal(string.Format(ErrorMessages.StatusNameNullReference, Invalid_Status_Name), ex.Message); }
public async Task GetStatusIdByNameAsync_WithNullName_ShouldThrowArgumentNullException() { var context = OmmDbContextInMemoryFactory.InitializeContext(); await SeedData(context); this.statusesService = new StatusesService(context); var ex = await Assert.ThrowsAsync <ArgumentNullException>(() => this.statusesService.GetStatusIdByNameAsync(null)); Assert.Equal(ErrorMessages.StatusNullParameter, ex.Message); }
public async Task GetStatusNameByIdAsync_ShouldReturnCorrectResult(string expectedName, int statusId) { string errorMessagePrefix = "StatusesService GetStatusIdByNameAsync() method does not work properly."; var context = OmmDbContextInMemoryFactory.InitializeContext(); await SeedData(context); this.statusesService = new StatusesService(context); var actualName = await this.statusesService.GetStatusNameByIdAsync(statusId); Assert.True(expectedName == actualName, errorMessagePrefix + " " + "The status name is not correct"); }
public ManageTestController(IMappingProvider mapper, ITestsService tests, ICategoryService categories, IStatusesService statuses, UserManager <User> userManager, IMemoryCache memoryCache) { this.mapper = mapper ?? throw new ArgumentNullException("Mapper can not be null"); this.tests = tests ?? throw new ArgumentNullException("Tests service cannot be null"); this.categories = categories ?? throw new ArgumentNullException("Categories service cannot be null"); this.statuses = statuses ?? throw new ArgumentNullException("Statuses service cannot be null"); this.userManager = userManager ?? throw new ArgumentNullException("User manager cannot be null"); this.cache = memoryCache ?? throw new ArgumentNullException("Cache cannot be null!"); }
public ClassWrapper(IUsersService usersService, IProjectsService projectsService, ITasksService tasksService, IRolesService rolesService, ICategoriesService categoriesService, IStatusesService statusesService, IPrioritiesService prioritiesService, ITypesService typesService, ISlotsService slotsService) { _usersService = usersService; _projectsService = projectsService; _tasksService = tasksService; _rolesService = rolesService; _categoriesService = categoriesService; _statusesService = statusesService; _prioritiesService = prioritiesService; _typesService = typesService; _slotsService = slotsService; }
public ClassWrapper() { _usersService = new UsersService(); _projectsService = new ProjectsService(); _tasksService = new TasksService(); _membershipsService = new MembershipsService(); _userMembershipsService = new UserMembershipsService(); _rolesService = new RolesService(); _usersRolesService = new UsersRolesService(); _categoriesService = new CategoriesService(); _statusesService = new StatusesService(); _prioritiesService = new PrioritiesService(); _typesService = new TypesService(); _slotsService = new SlotsService(); }
public WcfService( IUsersService usersService, IRolesService rolesService, ICategoriesService categoriesService, IPrioritiesService prioritiesService, ITypesService typesService, IUsersRolesService usersRolesService, IStatusesService statusesService) { _usersService = usersService; _rolesService = rolesService; _categoriesService = categoriesService; _prioritiesService = prioritiesService; _typesService = typesService; _usersRolesService = usersRolesService; _statusesService = statusesService; }
public CommonLookUps( IMoveQueueTypesService movequeuetypesService , IMoveQueueContextsService movequeuecontextsService , IStatusesService statusesService , ILocationFunctionsService locationfunctionsService , IInventoryUnitTransactionContextsService inventoryunittransactioncontextsService , IInventoryStatesService inventorystatesService , IHandlingUnitTypesService handlingunittypesService ) { _movequeuetypesService = movequeuetypesService; _movequeuecontextsService = movequeuecontextsService; _statusesService = statusesService; _locationfunctionsService = locationfunctionsService; _inventoryunittransactioncontextsService = inventoryunittransactioncontextsService; _inventorystatesService = inventorystatesService; _handlingunittypesService = handlingunittypesService; }
public async Task GetAll_WithDummyData_ShouldReturnCorrectResults() { string errorMessagePrefix = "StatusesService GetAllStatuses() method does not work properly."; var context = OmmDbContextInMemoryFactory.InitializeContext(); await SeedData(context); this.statusesService = new StatusesService(context); List <StatusListDto> actualResults = await this.statusesService.GetAllStatuses().ToListAsync(); List <StatusListDto> expectedResults = GetDummyData().To <StatusListDto>().ToList(); for (int i = 0; i < expectedResults.Count; i++) { var expectedEntry = expectedResults[i]; var actualEntry = actualResults[i]; Assert.True(expectedEntry.Id == actualEntry.Id, errorMessagePrefix + " " + "Id is not returned properly."); Assert.True(expectedEntry.Name == actualEntry.Name, errorMessagePrefix + " " + "Name is not returned properly."); } Assert.True(expectedResults.Count == actualResults.Count, errorMessagePrefix + " " + "Count of returned statuses is not correct"); }
public StatusesController(IStatusesService statusesService, IMapper mapper) { this.statusesService = statusesService; this.mapper = mapper; }
public StatusesController(IStatusesService statusesService) { _statusesService = statusesService; }
//Custom Code Start | Replaced Code Block //Replaced Code Block Start // public BotSpielBot(ILoggerFactory loggerFactory, BotSpielUserStateAccessors statePropertyAccessor, BotUserData botUserData, BotUserEntityContext botUserEntityContext, NavigationEntityData navigationEntityData //, PutAwayHandlingUnitsPost putawayhandlingunitsPost // , IPutAwayHandlingUnitsService putawayhandlingunitsService // ) //Replaced Code Block End public BotSpielBot(ILoggerFactory loggerFactory, BotSpielUserStateAccessors statePropertyAccessor, BotUserData botUserData, BotUserEntityContext botUserEntityContext, NavigationEntityData navigationEntityData , DropInventoryUnitsPost dropinventoryunitsPost , PickBatchPickingPost pickbatchpickingPost , PutAwayHandlingUnitsPost putawayhandlingunitsPost , SetUpExecutionParametersPost setupexecutionparametersPost , IPutAwayHandlingUnitsService putawayhandlingunitsService , ISetUpExecutionParametersService setupexecutionparametersService , IHandlingUnitsService handlingunitsService , UserManager <ApplicationUser> userManager , IFacilitiesService facilitiesService , PutAway putAway , IInventoryLocationsService inventorylocationsService , ILocationFunctionsService locationfunctionsService , IMoveQueueTypesService movequeuetypesService , IMoveQueueContextsService movequeuecontextsService , IInventoryUnitsService inventoryunitsService , IStatusesService statusesService , IMoveQueuesService movequeuesService , IPickBatchesService pickbatchesService , CommonLookUps commonLookUps , Picking picking , Shipping shipping , IPickBatchPickingService pickbatchpickingService , IOutboundOrderLinesInventoryAllocationService outboundorderlinesinventoryallocationService , IOutboundOrderLinePackingService outboundorderlinepackingService ) //Custom Code End { if (loggerFactory == null) { throw new System.ArgumentNullException(nameof(loggerFactory)); } _logger = loggerFactory.CreateLogger <BotSpielBot>(); _botUserData = botUserData; _botUserEntityContext = botUserEntityContext; _navigationEntityData = navigationEntityData; _botSpielUserStateAccessors = statePropertyAccessor ?? throw new System.ArgumentNullException("state accessor can't be null"); _dropinventoryunitsPost = dropinventoryunitsPost; _pickbatchpickingPost = pickbatchpickingPost; _putawayhandlingunitsPost = putawayhandlingunitsPost; _setupexecutionparametersPost = setupexecutionparametersPost; _putawayhandlingunitsService = putawayhandlingunitsService; _setupexecutionparametersService = setupexecutionparametersService; //Custom Code Start | Added Code Block _handlingunitsService = handlingunitsService; _userManager = userManager; _facilitiesService = facilitiesService; _putAway = putAway; _inventorylocationsService = inventorylocationsService; _locationfunctionsService = locationfunctionsService; _movequeuetypesService = movequeuetypesService; _movequeuecontextsService = movequeuecontextsService; _inventoryunitsService = inventoryunitsService; _statusesService = statusesService; _movequeuesService = movequeuesService; _pickbatchesService = pickbatchesService; _commonLookUps = commonLookUps; _picking = picking; _shipping = shipping; _pickbatchpickingService = pickbatchpickingService; _outboundorderlinesinventoryallocationService = outboundorderlinesinventoryallocationService; _outboundorderlinepackingService = outboundorderlinepackingService; //Custom Code End // The DialogSet needs a DialogState accessor, it will call it when it has a turn context. _dialogs = new DialogSet(statePropertyAccessor.DialogStateAccessor) .Add(new RootDialog(RootDialogId, _botUserEntityContext, _navigationEntityData)) .Add(new CreatePickBatchPickingDialog(CreatePickBatchPickingDialogId, _pickbatchpickingService, _pickbatchpickingPost, _botSpielUserStateAccessors, _pickbatchesService, _commonLookUps, _picking, _inventoryunitsService, _movequeuesService, _handlingunitsService, _outboundorderlinesinventoryallocationService, _outboundorderlinepackingService)) //Custom Code Start | Replaced Code Block //Replaced Code Block Start //.Add(new CreatePutAwayHandlingUnitsDialog(CreatePutAwayHandlingUnitsDialogId, _putawayhandlingunitsService, _putawayhandlingunitsPost, _botSpielUserStateAccessors)) //Replaced Code Block End .Add(new CreatePutAwayHandlingUnitsDialog( CreatePutAwayHandlingUnitsDialogId , _putawayhandlingunitsService , _putawayhandlingunitsPost , _botSpielUserStateAccessors , _handlingunitsService , _putAway , _botUserData , _inventorylocationsService , _movequeuetypesService , _movequeuecontextsService , _inventoryunitsService , _statusesService , _movequeuesService )) //Custom Code End .Add(new CreateSetUpExecutionParametersDialog(CreateSetUpExecutionParametersDialogId, _setupexecutionparametersService, _setupexecutionparametersPost, _botSpielUserStateAccessors)) .Add(new CreateDropInventoryUnitsDialog(CreateDropInventoryUnitsDialogId, _dropinventoryunitsService, _dropinventoryunitsPost, _botSpielUserStateAccessors, _shipping, _inventorylocationsService, _commonLookUps, _movequeuesService)) .Add(new ConfirmPrompt(ConfirmPromptId, defaultLocale: Culture.English)) //Custom Code Start | Added Code Block .Add(new ChoicePrompt(ChoicesPromptId, defaultLocale: Culture.English)) .Add(new CreateGetPickBatchesDialog(CreateGetPickBatchesDialogId, new GetPickBatchesPost(), _botSpielUserStateAccessors, _pickbatchesService, _commonLookUps)); //Custom Code End }
//Custom Code Start | Replaced Code Block //Replaced Code Block Start //public CreatePutAwayHandlingUnitsDialog(string id, IPutAwayHandlingUnitsService putawayhandlingunitsService, PutAwayHandlingUnitsPost putawayhandlingunitsPost, BotSpielUserStateAccessors statePropertyAccessor) //Replaced Code Block End public CreatePutAwayHandlingUnitsDialog(string id , IPutAwayHandlingUnitsService putawayhandlingunitsService , PutAwayHandlingUnitsPost putawayhandlingunitsPost , BotSpielUserStateAccessors statePropertyAccessor , IHandlingUnitsService handlingunitsService , PutAway putAway , BotUserData botUserData , IInventoryLocationsService inventorylocationsService , IMoveQueueTypesService movequeuetypesService , IMoveQueueContextsService movequeuecontextsService , IInventoryUnitsService inventoryunitsService , IStatusesService statusesService , IMoveQueuesService movequeuesService ) //Custom Code End : base(id) { InitialDialogId = Id; _botSpielUserStateAccessors = statePropertyAccessor ?? throw new System.ArgumentNullException("state accessor can't be null"); _putawayhandlingunitsService = putawayhandlingunitsService; _putawayhandlingunitsPost = putawayhandlingunitsPost; //Custom Code Start | Added Code Block _handlingunitsService = handlingunitsService; _putAway = putAway; _botUserData = botUserData; _inventorylocationsService = inventorylocationsService; _movequeuetypesService = movequeuetypesService; _movequeuecontextsService = movequeuecontextsService; _inventoryunitsService = inventoryunitsService; _statusesService = statusesService; _movequeuesService = movequeuesService; PromptValidator <string> putAwayHandlingUnitValidator = async(promptContext, cancellationToken) => { var value = promptContext.Recognized.Value.Trim().ToLower(); if (!_handlingunitsService.IndexDb().Where(x => x.sHandlingUnit.Trim().ToLower() == value).Any()) { await promptContext.Context.SendActivityAsync(MessageFactory.Text($"The handling unit {value} does not exist. Please enter a different value or exit."), cancellationToken); return(false); } else { return(true); } }; PromptValidator <string> inventoryDropLocationValidator = async(promptContext, cancellationToken) => { var value = promptContext.Recognized.Value.Trim().ToLower(); var currentBotUserData = await _botSpielUserStateAccessors.BotUserDataAccessor.GetAsync(promptContext.Context, () => _botUserData); if (!_inventorylocationsService.IndexDb().Where(x => x.sInventoryLocation.Trim().ToLower() == value && x.ixFacility == currentBotUserData.ixFacility).Any() && currentBotUserData.sPutAwaySuggestion == "No Suggestion") { await promptContext.Context.SendActivityAsync(MessageFactory.Text($"The inventory location {value} does not exist in the facility. Please enter a different value or exit."), cancellationToken); return(false); } else { if (currentBotUserData.sPutAwaySuggestion.Trim().ToLower() != value) { await promptContext.Context.SendActivityAsync(MessageFactory.Text($"The inventory location {value} does not match the suggested location {currentBotUserData.sPutAwaySuggestion}. Please enter a different value or exit."), cancellationToken); return(false); } return(true); } }; //Custom Code End // Define the prompts used in the Dialog. //Custom Code Start | Replaced Code Block //Replaced Code Block Start //AddDialog(new TextPrompt(PutAwayHandlingUnitPromptId)); //Replaced Code Block End AddDialog(new TextPrompt(PutAwayHandlingUnitPromptId, putAwayHandlingUnitValidator)); //Custom Code End AddDialog(new TextPrompt(InventoryDropLocationPromptId, inventoryDropLocationValidator)); // Define the conversation flow for the Dialog. WaterfallStep[] steps = new WaterfallStep[] { PutAwayHandlingUnitPrompt, InventoryDropLocationPrompt, donePrompt, }; AddDialog(new WaterfallDialog(Id, steps)); }
public StatusesListViewComponent(IStatusesService statusesService) { this.statusesService = statusesService; }
public AssignmentsService(OmmDbContext context, IStatusesService statusesService, IAssignmentsEmployeesService assignmentsEmployeesService) { this.context = context; this.statusesService = statusesService; this.assignmentsEmployeesService = assignmentsEmployeesService; }
public StatusController(IStatusesService statusService) { this.statusService = statusService; }