Пример #1
0
        public void DoesNotMatchUnrelatedParameter()
        {
            var param = AParamOfCConstructor();

            var typedParam = new TypedParameter(typeof(string), "Yo!");

            Assert.False(typedParam.CanSupplyValue(param, Factory.CreateEmptyContainer(), out Func <object> vp));
        }
Пример #2
0
        public void DoesNotMatchPolymorphicallyTypedParameter()
        {
            var param = AParamOfCConstructor();

            var typedParam = new TypedParameter(typeof(B), new B());

            Assert.False(typedParam.CanSupplyValue(param, Factory.CreateEmptyContainer(), out Func <object> vp));
        }
Пример #3
0
        public void MatchesIdenticallyTypedParameter()
        {
            var param = AParamOfCConstructor();

            var typedParam = new TypedParameter(typeof(A), new A());

            Assert.True(typedParam.CanSupplyValue(param, Factory.CreateEmptyContainer(), out Func <object> vp));
        }
Пример #4
0
        public void MatchesIdenticallyTypedParameter()
        {
            var param = AParamOfCConstructor();

            var typedParam = new TypedParameter(typeof(A), new A());

            Func<object> vp;
            Assert.True(typedParam.CanSupplyValue(param, new Container(), out vp));
        }
Пример #5
0
        public void DoesNotMatchUnrelatedParameter()
        {
            var param = AParamOfCConstructor();

            var typedParam = new TypedParameter(typeof(string), "Yo!");

            Func<object> vp;
            Assert.False(typedParam.CanSupplyValue(param, new Container(), out vp));
        }
Пример #6
0
        public void DoesNotMatchPolymorphicallyTypedParameter()
        {
            var param = AParamOfCConstructor();

            var typedParam = new TypedParameter(typeof(B), new B());

            Func<object> vp;
            Assert.False(typedParam.CanSupplyValue(param, new Container(), out vp));
        }
Пример #7
0
        public void MatchesIdenticallyTypedParameter()
        {
            var param = AParamOfCConstructor();

            var typedParam = new TypedParameter(typeof(A), new A());

            Func <object> vp;

            Assert.IsTrue(typedParam.CanSupplyValue(param, new Container(), out vp));
        }