Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 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);
 }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        public void ConvertBackTest()
        {
            var converter = new BoolToWidthConverter();

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