コード例 #1
0
        public PersistedGrantAppServiceTests(WarmupInMemory inMemoryData)
        {
            InMemoryData    = inMemoryData;
            _persistedGrant = InMemoryData.Services.GetRequiredService <IPersistedGrantAppService>();
            _database       = InMemoryData.Services.GetRequiredService <JpProjectAdminUiContext>();
            var notifications = (DomainNotificationHandler)InMemoryData.Services.GetRequiredService <INotificationHandler <DomainNotification> >();

            notifications.Clear();
        }
コード例 #2
0
 public IdentityResourceAppServiceTests(WarmupInMemory inMemoryData, ITestOutputHelper output)
 {
     _output           = output;
     InMemoryData      = inMemoryData;
     _identityResource = InMemoryData.Services.GetRequiredService <IIdentityResourceAppService>();
     _database         = InMemoryData.Services.GetRequiredService <JpProjectAdminUiContext>();
     _notifications    = (DomainNotificationHandler)InMemoryData.Services.GetRequiredService <INotificationHandler <DomainNotification> >();
     _notifications.Clear();
 }
コード例 #3
0
 public ClientAppServiceInMemoryTest(WarmupInMemory inMemoryData, ITestOutputHelper output)
 {
     _faker            = new Faker();
     _output           = output;
     InMemoryData      = inMemoryData;
     _clientAppService = InMemoryData.Services.GetRequiredService <IClientAppService>();
     _database         = InMemoryData.Services.GetRequiredService <JpProjectAdminUiContext>();
     _notifications    = (DomainNotificationHandler)InMemoryData.Services.GetRequiredService <INotificationHandler <DomainNotification> >();
     _notifications.Clear();
 }
コード例 #4
0
        private static async Task ValidateIs4Context(JpDatabaseOptions options, JpProjectAdminUiContext id4AdminUiContext)
        {
            var configurationDatabaseExist = await DbHealthChecker.CheckTableExists <Client>(id4AdminUiContext);

            var operationalDatabaseExist = await DbHealthChecker.CheckTableExists <PersistedGrant>(id4AdminUiContext);

            var isDatabaseExist = configurationDatabaseExist && operationalDatabaseExist;

            if (!isDatabaseExist && options.MustThrowExceptionIfDatabaseDontExist)
            {
                throw new DatabaseNotFoundException("IdentityServer4 Database doesn't exist. Ensure it was created before.'");
            }
        }