示例#1
0
        public void MethodInject_Scoped_InjectsCorrectDependencies()
        {
            //ARRANGE
            var container = new Container(builder =>
            {
                builder.Register <ITestService10, TestService10>();
            });
            var instance = new MethodInjectionClass();

            //ACT
            Scoped scope = container.BeginScope();

            scope.MethodInject(instance);

            //ASSERT
            Assert.IsType <TestService10>(instance.TestService10);
        }