I have the following appsettings.json configuration.
"SettingsConfig": [
{
"Name": "Something",
"Node": "Something",
"SettingName": "Something"
},
{
"Name": "Something",
"Node": "Something",
"SettingName": "Something"
}]
I want to write UnitTest ,but the following syntax does not work.
_configuration = A.Fake<IConfiguration>();
A.CallTo(() => _configuration.GetSection("SettingsConfig")).Returns(new List<SettingsConfig>());
Error message: IConfigurationSection does not contain definition for Returns.
How IConfiguration can be mocked with FakeItEasy syntax in order to apply mock data for UnitTesting?
>(IReturnValueConfiguration>>, List)' requires a receiver of type 'IReturnValueConfiguration>>'`