0
justin created
I added MySettingProvider under core project
public class MYSettingProvider : SettingProvider
{
public const string SearchResultPageSize = "SearchResultPageSize";
public override IEnumerable<SettingDefinition> GetSettingDefinitions(SettingDefinitionProviderContext context)
{
return new[]
{
new SettingDefinition(
SearchResultPageSize,
"10"
),
};
}
Then Under MYCoreModule.cs
Configuration.Settings.Providers.Add<MYSettingProvider>();
Then under application Service project
SettingManager.GetSettingValue<int>(MYSettingProvider.PSearchResultPageSize);
}
Above code works when i run web project
But when i try to run my Unit Test and call service method under application project it fails with SettingManager being null. i tried adding below under MyTestModule with no success any ideas?
Configuration.Settings.Providers.Add<MySettingProvider>();