public void Test_StringConvertStringToVisibilityWithNegateTrue() { var converter = new TypeToObjectConverter { TrueValue = Visibility.Visible, FalseValue = Visibility.Collapsed, Type = typeof(string) }; var result = converter.Convert("anything", typeof(Visibility), "true", "en-us"); Assert.AreEqual(Visibility.Collapsed, result); }
public void Test_StringDoesntConvertBoolToVisibility() { var converter = new TypeToObjectConverter { TrueValue = Visibility.Visible, FalseValue = Visibility.Collapsed, Type = typeof(string) }; var result = converter.Convert(true, typeof(Visibility), null, "en-us"); Assert.AreEqual(Visibility.Collapsed, result); }