public void GetDefaultAliases() { AliasText alias = new AliasText(); Assert.IsTrue(alias.ContainsBoolean("true")); Assert.IsTrue(alias.ContainsBoolean("false")); Assert.IsTrue(alias.GetBoolean("tRUe")); Assert.IsFalse(alias.GetBoolean("FaLse")); }
public void GetBoolean() { AliasText alias = new AliasText(); Assert.IsFalse(alias.ContainsBoolean("on")); Assert.IsFalse(alias.ContainsBoolean("off")); alias.AddAlias("oN", true); alias.AddAlias("oFF", false); Assert.IsTrue(alias.ContainsBoolean("oN")); Assert.IsTrue(alias.ContainsBoolean("off")); Assert.IsTrue(alias.GetBoolean("oN")); Assert.IsFalse(alias.GetBoolean("OfF")); }
public void NonExistantBooleanText() { AliasText alias = new AliasText(); alias.AddAlias("true", true); alias.AddAlias("faLSe", false); Assert.IsTrue(alias.GetBoolean("Not present")); }
public void NonExistantBooleanText() { var alias = new AliasText(); alias.AddAlias("true", true); alias.AddAlias("faLSe", false); Assert.Throws <ArgumentException>(() => alias.GetBoolean("Not present")); }