Beispiel #1
0
        public void Convert_StringTrue_ExpectTrue()
        {
            var c = new BooleanToStringConverter();

            Assert.IsTrue((bool)c.ConvertBack("True", typeof(bool), null, null));
        }
Beispiel #2
0
        public void Convert_StringNeitherTrueOrFalse_ExpectFalse()
        {
            var c = new BooleanToStringConverter();

            Assert.IsFalse((bool)c.ConvertBack("F", typeof(bool), null, null));
        }
Beispiel #3
0
        public void ConvertBack_NonStringToBoolean_ExpectFalse()
        {
            var c = new BooleanToStringConverter();

            Assert.AreEqual(DependencyProperty.UnsetValue, c.ConvertBack(true, typeof(bool), null, null));
        }