示例#1
0
        public void YesVaryingCase()
        {
            var converter = new BoolConverterAuto();
            var result    = converter.Convert("yeS");

            Assert.AreEqual(true, result);
        }
示例#2
0
        public void FalseVaryingCase()
        {
            var converter = new BoolConverterAuto();
            var result    = converter.Convert("faLse");

            Assert.AreEqual(false, result);
        }
示例#3
0
        public void QuestionMark()
        {
            var converter = new BoolConverterAuto();
            var result    = converter.Convert("?");

            Assert.AreEqual(null, result);
        }
示例#4
0
        public void KnownFalseString()
        {
            var converter = new BoolConverterAuto()
            {
                KnownFalseString = "ofcourseNOT",
            };

            var result = converter.Convert(" OFcourseNOT  ");

            Assert.AreEqual(false, result);
        }
示例#5
0
        public void KnownTrueString()
        {
            var converter = new BoolConverterAuto()
            {
                KnownTrueString = "ofcourse",
            };

            var result = converter.Convert(" ofcourse");

            Assert.AreEqual(true, result);
        }