Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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));
        }