Ejemplo n.º 1
0
        public void BooleanToDoubleConverter_Convert()
        {
            BooleanToDoubleConverter converter = new BooleanToDoubleConverter
            {
                ValueForFalse = 2,
                ValueForTrue  = 3
            };

            object result = converter.Convert(true, null, null, null);

            Assert.Equal((double)3, result);

            result = converter.Convert(false, null, null, null);
            Assert.Equal((double)2, result);

            result = converter.Convert(null, null, null, null);
            Assert.Null(result);
        }
Ejemplo n.º 2
0
        public void BooleanToDoubleConverter_ConvertBack()
        {
            BooleanToDoubleConverter converter = new BooleanToDoubleConverter();

            Assert.Throws <NotImplementedException>(() => converter.ConvertBack(null, null, null, null));
        }