Mocking indexed property
Using Moq in ASP.NET Core 2.2, the get_Items setup does not work. But this does:
Mock<IConfiguration> configuration = new Mock<IConfiguration>();
configuration.Setup(x => x[key]).Returns(value);
Interface was a COM object and there were get function, so instead of directly accessing property using indexer use get function,
mock.Setup(f => f.get_Items(itemName)).Returns(expected);