public void TestString() { var input = "test"; InverseVisibilityConverter converter = new InverseVisibilityConverter(); Visibility result = (Visibility)converter.Convert(input, typeof(Visibility), null, null); Assert.AreEqual(Visibility.Collapsed, result); }
public void TestInt0() { var input = 0; InverseVisibilityConverter converter = new InverseVisibilityConverter(); Visibility result = (Visibility)converter.Convert(input, typeof(Visibility), null, null); Assert.AreEqual(Visibility.Visible, result); }
public void TestStringNull() { string input = null; InverseVisibilityConverter converter = new InverseVisibilityConverter(); Visibility result = (Visibility)converter.Convert(input, typeof(Visibility), null, null); Assert.AreEqual(Visibility.Visible, result); }
public void TestVisibiliyCollapsed() { Visibility input = Visibility.Collapsed; InverseVisibilityConverter converter = new InverseVisibilityConverter(); Visibility result = (Visibility)converter.Convert(input, typeof(Visibility), null, null); Assert.AreEqual(Visibility.Visible, result); }
public void TestObjectNotNull() { object input = new InverseVisibilityConverter(); InverseVisibilityConverter converter = new InverseVisibilityConverter(); Visibility result = (Visibility)converter.Convert(input, typeof(Visibility), null, null); Assert.AreEqual(Visibility.Collapsed, result); }
public void TestFilledIntCollection() { IEnumerable<int> input = new List<int>() { 1, 2, 3 }; InverseVisibilityConverter converter = new InverseVisibilityConverter(); Visibility result = (Visibility)converter.Convert(input, typeof(Visibility), null, null); Assert.AreEqual(Visibility.Collapsed, result); }
public void TestEmptyCollection() { IEnumerable<string> input = new List<string>(); InverseVisibilityConverter converter = new InverseVisibilityConverter(); Visibility result = (Visibility)converter.Convert(input, typeof(Visibility), null, null); Assert.AreEqual(Visibility.Visible, result); }