Reformat FeatureValueCacheItemInvalidator_Tests

pull/2523/head
Halil İbrahim Kalkan 6 years ago
parent fb4fe908b5
commit a641ae5ff6

@ -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();
}
}

Loading…
Cancel
Save