|
|
|
@ -63,4 +63,15 @@ public class SettingManager_Basic_Tests : SettingsTestBase |
|
|
|
(await _settingManager.GetOrNullGlobalAsync("MySetting1")).ShouldBe("43"); |
|
|
|
(await _settingProvider.GetOrNullAsync("MySetting1")).ShouldBe("43"); |
|
|
|
} |
|
|
|
|
|
|
|
[Fact] |
|
|
|
public async Task Should_Throw_Exception_If_Provider_Not_Found() |
|
|
|
{ |
|
|
|
var exception = await Assert.ThrowsAsync<AbpException>(async () => |
|
|
|
{ |
|
|
|
await _settingManager.SetAsync("MySetting1", "43", "UndefinedProvider", "UndefinedProviderKey"); |
|
|
|
}); |
|
|
|
|
|
|
|
exception.Message.ShouldBe("Could not find a setting provider named 'UndefinedProvider'."); |
|
|
|
} |
|
|
|
} |