public void CanConvert_CtorWithoutCanConvert_True()
        {
            var subject = new OneWayDelegateValueConverter <int, int>((i, c) => i);

            var result = subject.CanConvert(42, CultureInfo.InvariantCulture);

            Assert.IsTrue(result);
        }
        public void CanConvert_CtorWithoutCanConvert_True()
        {
            var subject = new OneWayDelegateValueConverter<int, int>((i, c) => i);

            var result = subject.CanConvert(42, CultureInfo.InvariantCulture);

            Assert.IsTrue(result);
        }
        public void CanConvert_DelegateCalled()
        {
            const int input = 42;
            const bool output = true;
            var culture = CultureInfo.InvariantCulture;

            var called = false;
            var subject = new OneWayDelegateValueConverter<int, int>(
                (i, c) => i,
                (i, c) =>
                {
                    called = true;
                    Assert.AreEqual(input, i);
                    Assert.AreEqual(culture, c);
                    return output;
                });

            var result = subject.CanConvert(input, culture);

            Assert.AreEqual(output, result);
            Assert.IsTrue(called);
        }
        public void CanConvert_DelegateCalled()
        {
            const int  input   = 42;
            const bool output  = true;
            var        culture = CultureInfo.InvariantCulture;

            var called  = false;
            var subject = new OneWayDelegateValueConverter <int, int>(
                (i, c) => i,
                (i, c) =>
            {
                called = true;
                Assert.AreEqual(input, i);
                Assert.AreEqual(culture, c);
                return(output);
            });

            var result = subject.CanConvert(input, culture);

            Assert.AreEqual(output, result);
            Assert.IsTrue(called);
        }