|
|
|
@ -26,21 +26,31 @@ namespace Volo.Abp.FeatureManagement |
|
|
|
public async Task Cache_Should_Invalidator_WhenFeatureChanged() |
|
|
|
{ |
|
|
|
// Arrange cache feature.
|
|
|
|
await _featureManagementStore.GetOrNullAsync(TestFeatureDefinitionProvider.SocialLogins, |
|
|
|
EditionFeatureValueProvider.ProviderName, |
|
|
|
TestEditionIds.Regular.ToString()).ConfigureAwait(false); |
|
|
|
(await _featureManagementStore.GetOrNullAsync( |
|
|
|
TestFeatureDefinitionProvider.SocialLogins, |
|
|
|
EditionFeatureValueProvider.ProviderName, |
|
|
|
TestEditionIds.Regular.ToString() |
|
|
|
).ConfigureAwait(false) |
|
|
|
).ShouldNotBeNull(); |
|
|
|
|
|
|
|
var feature = await _featureValueRepository.FindAsync(TestFeatureDefinitionProvider.SocialLogins, |
|
|
|
var feature = await _featureValueRepository.FindAsync( |
|
|
|
TestFeatureDefinitionProvider.SocialLogins, |
|
|
|
EditionFeatureValueProvider.ProviderName, |
|
|
|
TestEditionIds.Regular.ToString()).ConfigureAwait(false); |
|
|
|
TestEditionIds.Regular.ToString() |
|
|
|
).ConfigureAwait(false); |
|
|
|
|
|
|
|
// Act
|
|
|
|
await _featureValueRepository.DeleteAsync(feature).ConfigureAwait(false); |
|
|
|
|
|
|
|
// Assert
|
|
|
|
(await _cache.GetAsync(FeatureValueCacheItem.CalculateCacheKey(TestFeatureDefinitionProvider.SocialLogins, |
|
|
|
EditionFeatureValueProvider.ProviderName, |
|
|
|
TestEditionIds.Regular.ToString())).ConfigureAwait(false)).ShouldBeNull(); |
|
|
|
(await _cache.GetAsync( |
|
|
|
FeatureValueCacheItem.CalculateCacheKey( |
|
|
|
TestFeatureDefinitionProvider.SocialLogins, |
|
|
|
EditionFeatureValueProvider.ProviderName, |
|
|
|
TestEditionIds.Regular.ToString() |
|
|
|
) |
|
|
|
).ConfigureAwait(false) |
|
|
|
).ShouldBeNull(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|