public void WhenConstructedThenInitialized()
        {
            // Arrange

            // Act
            var actual = new BooleanToKnownValueConverter();

            // Assert
            Assert.IsNotNull(actual);
        }
        public void WhenConvertBackCalledWithNonMatchThenUnsetValueReturned()
        {
            // Arrange
            var expected = DependencyProperty.UnsetValue;

            var value = new object();

            var target = new BooleanToKnownValueConverter();

            // Act
            var actual = target.ConvertBack(value, typeof(bool?), null, CultureInfo.InvariantCulture);

            // Assert
            Assert.AreEqual(expected, actual);
        }
        public void WhenConvertBackCalledWithWhenNullThenNullReturned()
        {
            // Arrange
            var expected = (object)null;

            var value = new object();

            var target = new BooleanToKnownValueConverter();
            target.WhenNull = value;

            // Act
            var actual = target.ConvertBack(value, typeof(bool?), null, CultureInfo.InvariantCulture);

            // Assert
            Assert.AreEqual(expected, actual);
        }
        public void WhenConvertCalledWithFalseThenWhenFalseReturned()
        {
            // Arrange
            var expected = new object();

            var value = false;

            var target = new BooleanToKnownValueConverter();
            target.WhenFalse = expected;

            // Act
            var actual = target.Convert(value, typeof(object), null, CultureInfo.InvariantCulture);

            // Assert
            Assert.AreSame(expected, actual);
        }
        public void WhenWhenTrueSetThenValueUpdated()
        {
            // Arrange
            var expected = new object();

            var target = new BooleanToKnownValueConverter();

            // Act
            target.WhenTrue = expected;
            var actual = target.WhenTrue;

            // Assert
            Assert.AreSame(expected, actual);
        }