示例#1
0
        public void ShouldInjectOptionalInConstructorParameter()
        {
            cnt.Bind <TestType>().ToThemselves();

            var provider = new ClassInstanceProvider(typeof(ClassWithConstructorParametersInjection));
            var obj      = provider.Create(cnt) as ClassWithConstructorParametersInjection;

            Assert.That(obj.Object, Is.Not.Null);
            Assert.That(obj.Object, Is.TypeOf <TestType>());
        }
示例#2
0
 public void SetUp()
 {
     cnt = new InjectikusClassTestWrapper();
     cnt.Bind <TestType>().ToThemselves();
 }