Exemple #1
0
        public void Convert_ShouldReturnConvertedValue()
        {
            var expected = new object();
            var testee   = new FuncConversionCallback((value, info) => expected);

            var result = testee.Convert("AnyValue", GetTestPropertyInfo());

            result.Should().Be(expected);
        }
Exemple #2
0
        public void Convert_ShouldExecuteConversionCallback()
        {
            bool wasCalled = false;
            var  testee    = new FuncConversionCallback((value, info) =>
            {
                wasCalled = true;
                return(null);
            });

            testee.Convert("AnyValue", GetTestPropertyInfo());

            wasCalled.Should().BeTrue();
        }