public ParkingService(DataContext context, IGarageService garageService, ISpaceService spaceService, IUserService userService) { _context = context; _userService = userService; _spaceService = spaceService; _garageService = garageService; }
public virtual async void TestDelete() { var builder = new WebHostBuilder() .UseEnvironment("Production") .UseStartup <TestStartup>(); TestServer testServer = new TestServer(builder); var client = new ApiClient(testServer.CreateClient()); client.SetBearerToken(JWTTestHelper.GenerateBearerToken()); ApplicationDbContext context = testServer.Host.Services.GetService(typeof(ApplicationDbContext)) as ApplicationDbContext; ISpaceService service = testServer.Host.Services.GetService(typeof(ISpaceService)) as ISpaceService; var model = new ApiSpaceServerRequestModel(); model.SetProperties("B", "B"); CreateResponse <ApiSpaceServerResponseModel> createdResponse = await service.Create(model); createdResponse.Success.Should().BeTrue(); ActionResponse deleteResult = await client.SpaceDeleteAsync(2); deleteResult.Success.Should().BeTrue(); ApiSpaceServerResponseModel verifyResponse = await service.Get(2); verifyResponse.Should().BeNull(); }
public GetSpacesCommand( ILayoutRepository layoutRepository, ISpaceService spaceService) { _layoutRepository = layoutRepository; _spaceService = spaceService; }
public SharedSpaceService(IUnitOfWork unitOfWork, ILogger logger, IUsersService userService, ISpaceService spaceService) { _unitOfWork = unitOfWork; _logger = logger; _userService = userService; _spaceService = spaceService; }
public virtual async void TestUpdate() { var builder = new WebHostBuilder() .UseEnvironment("Production") .UseStartup <TestStartup>(); TestServer testServer = new TestServer(builder); var client = new ApiClient(testServer.CreateClient()); client.SetBearerToken(JWTTestHelper.GenerateBearerToken()); var mapper = new ApiSpaceServerModelMapper(); ApplicationDbContext context = testServer.Host.Services.GetService(typeof(ApplicationDbContext)) as ApplicationDbContext; ISpaceService service = testServer.Host.Services.GetService(typeof(ISpaceService)) as ISpaceService; ApiSpaceServerResponseModel model = await service.Get(1); ApiSpaceClientRequestModel request = mapper.MapServerResponseToClientRequest(model); request.SetProperties("B", "B"); UpdateResponse <ApiSpaceClientResponseModel> updateResponse = await client.SpaceUpdateAsync(model.Id, request); context.Entry(context.Set <Space>().ToList()[0]).Reload(); updateResponse.Record.Should().NotBeNull(); updateResponse.Success.Should().BeTrue(); updateResponse.Record.Id.Should().Be(1); context.Set <Space>().ToList()[0].Description.Should().Be("B"); context.Set <Space>().ToList()[0].Name.Should().Be("B"); updateResponse.Record.Id.Should().Be(1); updateResponse.Record.Description.Should().Be("B"); updateResponse.Record.Name.Should().Be("B"); }
public GameContext(IHeroService heroService, IInputService inputService, ITimeService timeService, ISpaceService spaceService, IRandomService randomService) { HeroService = heroService; InputService = inputService; TimeService = timeService; SpaceService = spaceService; RandomService = randomService; }
public GitHubApiController(ISpaceService spaceService, IGitHubService gitHubService) { Contract.Requires(spaceService != null); Contract.Requires(gitHubService != null); _spaceService = spaceService; _gitHubService = gitHubService; }
public SpacesController( ISpaceService spaceService, IMapper mapper, IOptions <AppSettings> appSettings) { _spaceService = spaceService; _mapper = mapper; _appSettings = appSettings.Value; }
public AbstractSpaceController( ApiSettings settings, ILogger <AbstractSpaceController> logger, ITransactionCoordinator transactionCoordinator, ISpaceService spaceService, IApiSpaceModelMapper spaceModelMapper ) : base(settings, logger, transactionCoordinator) { this.SpaceService = spaceService; this.SpaceModelMapper = spaceModelMapper; }
public SpaceController( ApiSettings settings, ILogger <SpaceController> logger, ITransactionCoordinator transactionCoordinator, ISpaceService spaceService, IApiSpaceServerModelMapper spaceModelMapper ) : base(settings, logger, transactionCoordinator) { this.SpaceService = spaceService; this.SpaceModelMapper = spaceModelMapper; this.BulkInsertLimit = 250; this.MaxLimit = 1000; this.DefaultLimit = 250; }
/// <summary> /// Initializes a new instance of the MainViewModel class. /// </summary> public SpaceListViewModel(ConfluenceToolWindowNavigatorViewModel parent) { this._spaceService = new SpaceService(); this._parent = parent; this.SpaceList = new ObservableCollection <Space>(); this.SpaceSelectedCommand = new DelegateCommand(OnItemSelected); OleMenuCommandService service = ConfluencePackage.Mcs; InitializeCommands(service); GetSpacesAsync(); this.SpaceList.CollectionChanged += this.OnCollectionChanged; }
public SubscriptionDeleteCommandHandler(ISpaceService spaceService, ISubscriptionService subService) { this.spaceService = spaceService; this.subService = subService; }
/// <summary> /// /// </summary> /// <param name="spaceService"></param> /// <param name="logger"></param> public SpaceController(ISpaceService spaceService) { _spaceService = spaceService; }
public SpaceUpdateCommandHandler(ISpaceService service) { this.service = service; }
public PostAlterCommandPolicy(IPostService postService, ISpaceService spaceService, IRoleService roleService) { this.postService = postService; this.spaceService = spaceService; this.roleService = roleService; }
public SpaceController(ISpaceService repository) { this.repo = repository; }
public PostCreateCommandHandler(ISpaceService spaceService, IPostService postService) { this.spaceService = spaceService; this.postService = postService; }
public SpaceController(ISpaceService spaceService, IAssetService assetService) { _spaceService = spaceService; _assetService = assetService; }
public CommentAlterCommandPolicy(ICommentService commentService, ISpaceService spaceService, IRoleService roleService) { this.commentService = commentService; this.spaceService = spaceService; this.roleService = roleService; }