public void BoolToVisibilityConverter_DefaultValues()
        {
            var converter = new BoolToVisibilityConverter();

            Assert.AreEqual(converter.TrueValue, Visibility.Visible);
            Assert.AreEqual(converter.FalseValue, Visibility.Collapsed);
        }
        public void BoolToVisibilityConverter_Convert_NonBoolInput_ThrowsArgumentException()
        {
            var converter = new BoolToVisibilityConverter();

            Exceptions.Expect<ArgumentException>(() =>
            {
                converter.Convert("NotABoolean", typeof(Visibility), null, CultureInfo.InvariantCulture);
            });
        }
        public void BoolToVisibilityConverter_Convert_NonVisibilityOutput_ThrowsArgumentException()
        {
            var converter = new BoolToVisibilityConverter();
            var notVisibilityType = typeof(string);

            Exceptions.Expect<ArgumentException>(() =>
            {
                converter.Convert(true, notVisibilityType, null, CultureInfo.InvariantCulture);
            });
        }
        public void BoolToVisibilityConverter_Convert_False_ReturnsFalseValue()
        {
            var converter = new BoolToVisibilityConverter
            {
                TrueValue = Visibility.Hidden,
                FalseValue = Visibility.Visible
            };
            object result = converter.Convert(false, typeof(Visibility), null, CultureInfo.InvariantCulture);

            Assert.IsInstanceOfType(result, typeof(Visibility));
            Assert.AreEqual(result, Visibility.Visible);
        }