コード例 #1
0
        public void ValidateLazyAndPrototypeCausesBail()
        {
            RootObjectDefinition def
                = new RootObjectDefinition(typeof(TestObject), AutoWiringMode.No);

            def.IsLazyInit  = true;
            def.IsSingleton = false;
            def.Validate();
        }
コード例 #2
0
        public void ValidateLazyAndPrototypeCausesBail()
        {
            RootObjectDefinition def
                = new RootObjectDefinition(typeof(TestObject), AutoWiringMode.No);

            def.IsLazyInit  = true;
            def.IsSingleton = false;
            Assert.Throws <ObjectDefinitionValidationException>(() => def.Validate());
        }
コード例 #3
0
 public void ValidateLazyAndPrototypeCausesBail()
 {
     RootObjectDefinition def
         = new RootObjectDefinition( typeof( TestObject ), AutoWiringMode.No );
     def.IsLazyInit = true;
     def.IsSingleton = false;
     def.Validate();
 }
コード例 #4
0
 public void ValidateLazyAndPrototypeCausesBail()
 {
     RootObjectDefinition def
         = new RootObjectDefinition( typeof( TestObject ), AutoWiringMode.No );
     def.IsLazyInit = true;
     def.IsSingleton = false;
     Assert.Throws<ObjectDefinitionValidationException>(() => def.Validate());
 }