Ejemplo n.º 1
0
        public void ConvertTest()
        {
            DisplayModeToVisibility target = new DisplayModeToVisibility();
            object value = true;
            Type targetType = null;
            object parameter = null;
            CultureInfo culture = null;
            object expected = "Visible";
            object actual;
            actual = target.Convert(value, targetType, parameter, culture);
            Assert.AreEqual(expected, actual);

            value = false;
            expected = "Visible";
            actual = target.Convert(value, targetType, parameter, culture);
            Assert.AreEqual(expected, actual);

            value = null;
            expected = "Collapsed";
            actual = target.Convert(value, targetType, parameter, culture);
            Assert.AreEqual(expected, actual);

            target.Invert = true;

            expected = "Visible";
            actual = target.Convert(value, targetType, parameter, culture);
            Assert.AreEqual(expected, actual);

            value = false;
            expected = "Collapsed";
            actual = target.Convert(value, targetType, parameter, culture);
            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 2
0
        public void ConvertTest()
        {
            DisplayModeToVisibility target = new DisplayModeToVisibility();
            object      value      = true;
            Type        targetType = null;
            object      parameter  = null;
            CultureInfo culture    = null;
            object      expected   = "Visible";
            object      actual;

            actual = target.Convert(value, targetType, parameter, culture);
            Assert.AreEqual(expected, actual);

            value    = false;
            expected = "Visible";
            actual   = target.Convert(value, targetType, parameter, culture);
            Assert.AreEqual(expected, actual);

            value    = null;
            expected = "Collapsed";
            actual   = target.Convert(value, targetType, parameter, culture);
            Assert.AreEqual(expected, actual);

            target.Invert = true;

            expected = "Visible";
            actual   = target.Convert(value, targetType, parameter, culture);
            Assert.AreEqual(expected, actual);

            value    = false;
            expected = "Collapsed";
            actual   = target.Convert(value, targetType, parameter, culture);
            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 3
0
 public void ConvertBackTest()
 {
     DisplayModeToVisibility target = new DisplayModeToVisibility();
     object value = null;
     Type targetType = null;
     object parameter = null;
     CultureInfo culture = null;
     //object expected = null;
     object actual;
     Assert.Throws<NotImplementedException>(
         () => actual = target.ConvertBack(value, targetType, parameter, culture));
 }
Ejemplo n.º 4
0
        public void ConvertBackTest()
        {
            DisplayModeToVisibility target = new DisplayModeToVisibility();
            object      value      = null;
            Type        targetType = null;
            object      parameter  = null;
            CultureInfo culture    = null;
            //object expected = null;
            object actual;

            Assert.Throws <NotImplementedException>(
                () => actual = target.ConvertBack(value, targetType, parameter, culture));
        }
Ejemplo n.º 5
0
        public void InvertTest()
        {
            DisplayModeToVisibility target = new DisplayModeToVisibility();
            bool expected = false;
            bool actual;

            target.Invert = expected;
            actual        = target.Invert;
            Assert.AreEqual(expected, actual);

            expected      = true;
            target.Invert = expected;
            actual        = target.Invert;
            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 6
0
        public void DisplayModeToVisibilityConstructorTest()
        {
            DisplayModeToVisibility target = new DisplayModeToVisibility();

            Assert.IsFalse(target.Invert);
        }
Ejemplo n.º 7
0
        public void InvertTest()
        {
            DisplayModeToVisibility target = new DisplayModeToVisibility();
            bool expected = false;
            bool actual;
            target.Invert = expected;
            actual = target.Invert;
            Assert.AreEqual(expected, actual);

            expected = true;
            target.Invert = expected;
            actual = target.Invert;
            Assert.AreEqual(expected, actual);
        }
Ejemplo n.º 8
0
 public void DisplayModeToVisibilityConstructorTest()
 {
     DisplayModeToVisibility target = new DisplayModeToVisibility();
     Assert.IsFalse(target.Invert);
 }