Example #1
0
 public void BoolToVisibilityConverter_TrueReturnsVisible()
 {
     BoolToVisibilityConverter c = new BoolToVisibilityConverter();
     var res = c.Convert(true, typeof(Visibility), null, null);
     Assert.IsTrue((Visibility)res == Visibility.Visible, "Should have been 'Visible'");
 }
Example #2
0
 public void BoolToVisibilityConverter_FalseReturnsHidden()
 {
     BoolToVisibilityConverter c = new BoolToVisibilityConverter();
     var res = c.Convert(false, typeof(Visibility), null, null);
     Assert.IsTrue((Visibility)res == Visibility.Hidden, "Should have been 'Hidden'");
 }