Improve SettingManager_Tests.Should_Set_And_Get_Encrypted_Values.

pull/652/head
Halil ibrahim Kalkan 6 years ago
parent 720d310d07
commit ecde920764

@ -27,21 +27,25 @@ namespace Volo.Abp.Settings
.ShouldBe("default-value");
}
[Fact]
public async Task Should_Set_And_Get_Encrypted_Values()
[Theory]
[InlineData(null)]
[InlineData("")]
[InlineData("abc")]
[InlineData("This is a relatively long text... This is a relatively long text... This is a relatively long text... ")]
public async Task Should_Set_And_Get_Encrypted_Values(string plainValue)
{
(await _settingManager.GetOrNullAsync(TestSettingNames.TestSettingEncrypted))
.ShouldBeNull();
await _settingManager.SetAsync(
TestSettingNames.TestSettingEncrypted,
"abc",
plainValue,
TestSettingValueProvider.ProviderName,
null
);
(await _settingManager.GetOrNullAsync(TestSettingNames.TestSettingEncrypted))
.ShouldBe("abc");
.ShouldBe(plainValue);
}
//TODO: Needs more tests with more advanced scenarios.

Loading…
Cancel
Save