예제 #1
0
        public void EmptyStringToVisibilityConverter_UnitTest_CollapsedWhenEmptyStringValue_ExpectsVisible()
        {
            var converter = new EmptyStringToVisibilityConverter();

            converter.EmptyStringVisiblity = Visibility.Collapsed;
            var actual = (Visibility)converter.Convert("Anything", typeof(Visibility), null, null);
            const Visibility expected = Visibility.Visible;

            Assert.AreEqual(expected, actual);
        }
예제 #2
0
        EmptyStringToVisibilityConverter_UnitTest_VisibleWhenEmptyStringNull_ExpectsVisible()
        {
            var converter = new EmptyStringToVisibilityConverter();

            converter.EmptyStringVisiblity = Visibility.Visible;
            var actual = (Visibility)converter.Convert(string.Empty, typeof(Visibility), null, null);
            const Visibility expected = Visibility.Visible;

            Assert.AreEqual(expected, actual);
        }
예제 #3
0
        public void EmptyStringToVisibilityConverter_UnitTest_CollapsedWhenEmptyStringNull_ExpectsCollapsed()
        {
            var converter = new EmptyStringToVisibilityConverter();

            converter.EmptyStringVisiblity = Visibility.Collapsed;
            var actual = (Visibility)converter.Convert(string.Empty, typeof(Visibility), null, null);
            const Visibility expected = Visibility.Collapsed;

            Assert.AreEqual(expected, actual);
        }