Example #1
0
        public void OnTestStarting()
        {
            DatabaseFixture.OnTestStarting();

            ResetMocks();

            MemoryCache.Clear();

            // Restore HostingOptions values to default
            Settings.RewriteForbiddenToNotFound = false;

            Clock.UtcNow = MutableClock.Start;

            FeatureFlagProvider.Reset();

            MptxStateProvider.Clear();

            Services.GetRequiredService <IStandardsAndFrameworksCache>().Clear();

            CookieSettingsProvider.Reset();

            (Services.GetRequiredService <IUserInstanceStateStore>() as TestUserInstanceStateStore)?.Clear();

            Session.Clear();
        }
        public void OnTestStarting()
        {
            DatabaseFixture.OnTestStarting();

            ResetMocks();

            MemoryCache.Clear();

            Clock.UtcNow = MutableClock.Start;

            FeatureFlagProvider.Reset();

            MptxStateProvider.Clear();

            Services.GetRequiredService <IStandardsCache>().Clear();

            CookieSettingsProvider.Reset();

            (Services.GetRequiredService <IUserInstanceStateStore>() as TestUserInstanceStateStore)?.Clear();

            Session.Clear();

            BinaryStorageProvider.SetReturnsDefault(Task.FromResult <IReadOnlyCollection <BlobFileInfo> >(Array.Empty <BlobFileInfo>()));
        }