public static void GetValueAsInt32(string key, object input, int expected) { var config = new Configuration(); Assert.NotNull(config); config.SetValue(key, input); object value = config.GetInt32(key); Assert.NotNull(value); Assert.IsType <int>(value); Assert.Equal(expected, value); }