public void ParseConfigHandlesBadConversions() { Assert.AreEqual(5, AdapterConfig.ParseConfig <int>("not an int", 5)); }
public void ParseConfigHandlesEmptyString() { Assert.AreEqual(0, AdapterConfig.ParseConfig <int>("")); }
public void ParseConfigUsesDefault() { Assert.AreEqual("foobar", AdapterConfig.ParseConfig <string>(null, "foobar")); }
public void ParseConfigUsesTypeDefault() { Assert.AreEqual(0, AdapterConfig.ParseConfig <int>(null)); }
public void ParseConfigSafelyConvertsNull() { Assert.AreEqual(false, AdapterConfig.ParseConfig <bool>(null)); }