Ejemplo n.º 1
0
 public void Convert_False_YesNoAsValue()
 {
     var converter = new BooleanToTextConverter();
     Assert.AreEqual("No", converter.Convert(false, typeof (string), BooleanToTextConverterMode.YesNo, (CultureInfo)null));
 }
Ejemplo n.º 2
0
 public void Convert_False_XAsValue()
 {
     var converter = new BooleanToTextConverter();
     Assert.AreEqual(string.Empty, converter.Convert(false, typeof (string), BooleanToTextConverterMode.X, (CultureInfo)null));
 }
Ejemplo n.º 3
0
 public void Convert_True_XAsValue()
 {
     var converter = new BooleanToTextConverter();
     Assert.AreEqual("x", converter.Convert(true, typeof (string), BooleanToTextConverterMode.X, (CultureInfo)null));
 }
Ejemplo n.º 4
0
 public void Convert_True_YesNoAsText()
 {
     var converter = new BooleanToTextConverter();
     Assert.AreEqual("Yes", converter.Convert(true, typeof (string), "YesNo", (CultureInfo)null));
 }
Ejemplo n.º 5
0
 public void Convert_False()
 {
     var converter = new BooleanToTextConverter();
     Assert.AreEqual("No", converter.Convert(false, typeof (string), null, (CultureInfo)null));
 }
Ejemplo n.º 6
0
 public void Convert_NonBoolean()
 {
     var converter = new BooleanToTextConverter();
     Assert.AreEqual(string.Empty, converter.Convert("string", typeof (string), null, (CultureInfo)null));
 }
Ejemplo n.º 7
0
 public void ConvertBack()
 {
     var converter = new BooleanToTextConverter();
     Assert.AreEqual(ConverterHelper.DoNothingBindingValue, converter.ConvertBack(null, typeof (bool), null, (CultureInfo)null));
 }