public AtomicSparseFieldSetResourceDefinitionTests(ExampleIntegrationTestContext <TestableStartup <OperationsDbContext>, OperationsDbContext> testContext) { _testContext = testContext; testContext.UseController <OperationsController>(); testContext.ConfigureServicesAfterStartup(services => { services.AddSingleton <LyricPermissionProvider>(); services.AddResourceDefinition <LyricTextDefinition>(); services.AddScoped(typeof(IResourceChangeTracker <>), typeof(NeverSameResourceChangeTracker <>)); }); }
public AtomicQueryStringTests(ExampleIntegrationTestContext <TestableStartup <OperationsDbContext>, OperationsDbContext> testContext) { _testContext = testContext; testContext.UseController <OperationsController>(); testContext.UseController <MusicTracksController>(); testContext.ConfigureServicesAfterStartup(services => { services.AddSingleton <ISystemClock>(new FrozenSystemClock { UtcNow = FrozenTime }); services.AddScoped <IResourceDefinition <MusicTrack, Guid>, MusicTrackReleaseDefinition>(); }); var options = (JsonApiOptions)testContext.Factory.Services.GetRequiredService <IJsonApiOptions>(); options.AllowQueryStringOverrideForSerializerDefaultValueHandling = true; options.AllowQueryStringOverrideForSerializerNullValueHandling = true; }
public MultiTenancyTests(ExampleIntegrationTestContext <TestableStartup <MultiTenancyDbContext>, MultiTenancyDbContext> testContext) { _testContext = testContext; testContext.UseController <WebShopsController>(); testContext.UseController <WebProductsController>(); testContext.ConfigureServicesBeforeStartup(services => { services.AddSingleton <IHttpContextAccessor, HttpContextAccessor>(); services.AddScoped <ITenantProvider, RouteTenantProvider>(); }); testContext.ConfigureServicesAfterStartup(services => { services.AddResourceService <MultiTenantResourceService <WebShop> >(); services.AddResourceService <MultiTenantResourceService <WebProduct> >(); }); var options = (JsonApiOptions)_testContext.Factory.Services.GetRequiredService <IJsonApiOptions>(); options.UseRelativeLinks = true; }
public FireForgetTests(ExampleIntegrationTestContext <TestableStartup <FireForgetDbContext>, FireForgetDbContext> testContext) { _testContext = testContext; testContext.UseController <DomainUsersController>(); testContext.UseController <DomainGroupsController>(); testContext.ConfigureServicesAfterStartup(services => { services.AddResourceDefinition <FireForgetUserDefinition>(); services.AddResourceDefinition <FireForgetGroupDefinition>(); services.AddSingleton <MessageBroker>(); services.AddSingleton <ResourceDefinitionHitCounter>(); }); var messageBroker = _testContext.Factory.Services.GetRequiredService <MessageBroker>(); messageBroker.Reset(); var hitCounter = _testContext.Factory.Services.GetRequiredService <ResourceDefinitionHitCounter>(); hitCounter.Reset(); }
public ResourceDefinitionQueryCallbackTests(ExampleIntegrationTestContext <TestableStartup <CallableDbContext>, CallableDbContext> testContext) { _testContext = testContext; testContext.UseController <CallableResourcesController>(); testContext.ConfigureServicesAfterStartup(services => { services.AddResourceDefinition <CallableResourceDefinition>(); services.AddSingleton <IUserRolesService, FakeUserRolesService>(); }); var options = (JsonApiOptions)testContext.Factory.Services.GetRequiredService <IJsonApiOptions>(); options.IncludeTotalResourceCount = true; }
public AtomicResourceMetaTests(ExampleIntegrationTestContext <TestableStartup <OperationsDbContext>, OperationsDbContext> testContext) { _testContext = testContext; testContext.UseController <OperationsController>(); testContext.ConfigureServicesAfterStartup(services => { services.AddResourceDefinition <MusicTrackMetaDefinition>(); services.AddResourceDefinition <TextLanguageMetaDefinition>(); services.AddSingleton <ResourceDefinitionHitCounter>(); }); var hitCounter = _testContext.Factory.Services.GetRequiredService <ResourceDefinitionHitCounter>(); hitCounter.Reset(); }
public AtomicSerializationResourceDefinitionTests(ExampleIntegrationTestContext <TestableStartup <OperationsDbContext>, OperationsDbContext> testContext) { _testContext = testContext; testContext.UseController <OperationsController>(); testContext.ConfigureServicesAfterStartup(services => { services.AddResourceDefinition <RecordCompanyDefinition>(); services.AddSingleton <ResourceDefinitionHitCounter>(); services.AddScoped(typeof(IResourceChangeTracker <>), typeof(NeverSameResourceChangeTracker <>)); }); var hitCounter = _testContext.Factory.Services.GetRequiredService <ResourceDefinitionHitCounter>(); hitCounter.Reset(); }
public AtomicTransactionConsistencyTests(ExampleIntegrationTestContext <TestableStartup <OperationsDbContext>, OperationsDbContext> testContext) { _testContext = testContext; testContext.UseController <OperationsController>(); testContext.ConfigureServicesAfterStartup(services => { services.AddResourceRepository <PerformerRepository>(); services.AddResourceRepository <MusicTrackRepository>(); services.AddResourceRepository <LyricRepository>(); string postgresPassword = Environment.GetEnvironmentVariable("PGPASSWORD") ?? "postgres"; string dbConnectionString = $"Host=localhost;Port=5432;Database=JsonApiTest-{Guid.NewGuid():N};User ID=postgres;Password={postgresPassword}"; services.AddDbContext <ExtraDbContext>(options => options.UseNpgsql(dbConnectionString)); }); }
public NoHttpPostTests(ExampleIntegrationTestContext <TestableStartup <RestrictionDbContext>, RestrictionDbContext> testContext) { _testContext = testContext; testContext.UseController <BlockingHttpPostController>(); }
public AtomicUpdateToOneRelationshipTests(ExampleIntegrationTestContext <TestableStartup <OperationsDbContext>, OperationsDbContext> testContext) { _testContext = testContext; testContext.UseController <OperationsController>(); }
public AtomicModelStateValidationTests(ExampleIntegrationTestContext <ModelStateValidationStartup <OperationsDbContext>, OperationsDbContext> testContext) { _testContext = testContext; testContext.UseController <OperationsController>(); }
public ApiControllerAttributeTests(ExampleIntegrationTestContext <TestableStartup <CustomRouteDbContext>, CustomRouteDbContext> testContext) { _testContext = testContext; testContext.UseController <CiviliansController>(); }
public ActionResultTests(ExampleIntegrationTestContext <TestableStartup <ActionResultDbContext>, ActionResultDbContext> testContext) { _testContext = testContext; testContext.UseController <ToothbrushesController>(); }
public AtomicRequestBodyTests(ExampleIntegrationTestContext <TestableStartup <OperationsDbContext>, OperationsDbContext> testContext) { _testContext = testContext; testContext.UseController <OperationsController>(); }
public LinkInclusionTests(ExampleIntegrationTestContext <TestableStartup <LinksDbContext>, LinksDbContext> testContext) { _testContext = testContext; testContext.UseController <PhotoLocationsController>(); }
public AtomicDeleteResourceTests(ExampleIntegrationTestContext <TestableStartup <OperationsDbContext>, OperationsDbContext> testContext) { _testContext = testContext; testContext.UseController <OperationsController>(); }
public InheritanceTests(ExampleIntegrationTestContext <TestableStartup <InheritanceDbContext>, InheritanceDbContext> testContext) { _testContext = testContext; testContext.UseController <MenController>(); }
public AtomicRemoveFromToManyRelationshipTests(ExampleIntegrationTestContext <TestableStartup <OperationsDbContext>, OperationsDbContext> testContext) { _testContext = testContext; testContext.UseController <OperationsController>(); }
public QueryStringTests(ExampleIntegrationTestContext <TestableStartup <QueryStringDbContext>, QueryStringDbContext> testContext) { _testContext = testContext; testContext.UseController <CalendarsController>(); }
public HttpReadOnlyTests(ExampleIntegrationTestContext <TestableStartup <RestrictionDbContext>, RestrictionDbContext> testContext) { _testContext = testContext; testContext.UseController <BlockingWritesController>(); }
public ReplaceToManyRelationshipTests(ExampleIntegrationTestContext <TestableStartup <ReadWriteDbContext>, ReadWriteDbContext> testContext) { _testContext = testContext; testContext.UseController <WorkItemsController>(); }
public MaximumOperationsPerRequestTests(ExampleIntegrationTestContext <TestableStartup <OperationsDbContext>, OperationsDbContext> testContext) { _testContext = testContext; testContext.UseController <OperationsController>(); }
public SerializerDefaultValueHandlingTests(ExampleIntegrationTestContext <TestableStartup <QueryStringDbContext>, QueryStringDbContext> testContext) { _testContext = testContext; testContext.UseController <CalendarsController>(); }
public AtomicConstrainedOperationsControllerTests(ExampleIntegrationTestContext <TestableStartup <OperationsDbContext>, OperationsDbContext> testContext) { _testContext = testContext; testContext.UseController <CreateMusicTrackOperationsController>(); }