Browse Source

Reformat FeatureValueCacheItemInvalidator_Tests

pull/2523/head
Halil İbrahim Kalkan 7 years ago
parent
commit
a641ae5ff6
  1. 26
      modules/feature-management/test/Volo.Abp.FeatureManagement.Domain.Tests/Volo/Abp/FeatureManagement/FeatureValueCacheItemInvalidator_Tests.cs

26
modules/feature-management/test/Volo.Abp.FeatureManagement.Domain.Tests/Volo/Abp/FeatureManagement/FeatureValueCacheItemInvalidator_Tests.cs

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

Loading…
Cancel
Save