public void Test() { var config = new FakeConfig(new Dictionary <string, string> { ["int"] = "3", ["double"] = "abc", ["array"] = "1,2,3", }); Assert.Equal(3, config.GetProperty("int", new int?())); Assert.Equal(3d, config.GetProperty("double", 3d)); var array = config.GetProperty("array", ",", Array.Empty <string>()); Assert.NotNull(array); Assert.Equal(new[] { "1", "2", "3" }, array); }