public void WhenCalledConvertWithNotIsExpanded_ReturnsNaN()
 {
     const double width = 123.45;
     var boolToWidthConverter = new BoolToWidthConverter();
     boolToWidthConverter.Width = width;
     Assert.AreEqual(boolToWidthConverter.Convert(false, null, null, null), double.NaN);
 }
 public void WhenCalledConvertWithIsExpanded_ReturnsCorrectWidth()
 {
     const double width = 123.45;
     var boolToWidthConverter = new BoolToWidthConverter();
     boolToWidthConverter.Width = width;
     Assert.AreEqual(boolToWidthConverter.Convert(true, null, null, null), width);
 }
        public void ConvertTest()
        {
            var width = 12.34;
            var converter = new BoolToWidthConverter() {Width = width};

            var actual = converter.Convert(false, null, null, CultureInfo.InvariantCulture);

            Assert.AreEqual(double.NaN, actual);

            actual = converter.Convert(true, null, null, CultureInfo.InvariantCulture);

            Assert.AreEqual(width, actual);
        }
        public void ConvertBackTest()
        {
            var converter = new BoolToWidthConverter();

            converter.ConvertBack(null, null, null, CultureInfo.InvariantCulture);
        }