Beispiel #1
0
        public void ConvertBackWithInvalidParameterReturnsUnsetValue()
        {
            // Arrange
            var conv = new EnumToBool();

            // Act
            var value = conv.ConvertBack(true, null, 123, null);

            // Assert
            Assert.AreEqual(DependencyProperty.UnsetValue, value);
        }
Beispiel #2
0
        public void ConvertBackReturnsCorrectResult()
        {
            // Arrange
            var conv = new EnumToBool();

            // Act
            var value = conv.ConvertBack(true, typeof(TestEnum), "First", null);

            // Assert
            Assert.AreEqual(TestEnum.First, value);
        }