GetBoolean() public method

public GetBoolean ( string key ) : bool
key string
return bool
Example #1
0
        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"));
        }
Example #2
0
        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"));
        }
Example #3
0
        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"));
        }
Example #4
0
        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"));
        }
Example #5
0
        public void NonExistantBooleanText() {
            AliasText alias = new AliasText();
            alias.AddAlias("true", true);
            alias.AddAlias("faLSe", false);

            Assert.IsTrue(alias.GetBoolean("Not present"));
        }
Example #6
0
        public void NonExistantBooleanText()
        {
            AliasText alias = new AliasText();

            alias.AddAlias("true", true);
            alias.AddAlias("faLSe", false);

            Assert.IsTrue(alias.GetBoolean("Not present"));
        }