public void SetUp()
        {
            IList <ConfigurationPlugInPatternObject> init = new List <ConfigurationPlugInPatternObject>();

            init.Add(MakeGuardSpec("g", "h", typeof(SupportGuardFactory).FullName));
            init.Add(MakeObserverSpec("a", "b", typeof(SupportObserverFactory).FullName));
            PluggableObjectCollection desc = new PluggableObjectCollection();

            desc.AddPatternObjects(init);
            desc.AddObjects(PatternObjectHelper.BuiltinPatternObjects);
            service = new PatternObjectResolutionServiceImpl(desc);
        }
 private void TryInvalid(IEnumerable <ConfigurationPlugInPatternObject> config)
 {
     try
     {
         var desc = new PluggableObjectCollection();
         desc.AddPatternObjects(config.ToList(), SupportEngineImportServiceFactory.Make(_container));
         _service = new PatternObjectResolutionServiceImpl(_container, desc);
         Assert.Fail();
     }
     catch (ConfigurationException)
     {
         // expected
     }
 }
        public void SetUp()
        {
            _container = SupportContainer.Reset();

            IList <ConfigurationPlugInPatternObject> init = new List <ConfigurationPlugInPatternObject>();

            init.Add(MakeGuardSpec("g", "h", typeof(SupportGuardFactory).FullName));
            init.Add(MakeObserverSpec("a", "b", typeof(SupportObserverFactory).FullName));
            var desc = new PluggableObjectCollection();

            desc.AddPatternObjects(init, SupportEngineImportServiceFactory.Make(_container));
            desc.AddObjects(PatternObjectHelper.BuiltinPatternObjects);
            _service = new PatternObjectResolutionServiceImpl(_container, desc);
        }
 private void TryInvalid(IEnumerable <ConfigurationPlugInPatternObject> config)
 {
     try
     {
         PluggableObjectCollection desc = new PluggableObjectCollection();
         desc.AddPatternObjects(config.ToList());
         service = new PatternObjectResolutionServiceImpl(desc);
         Assert.Fail();
     }
     catch (ConfigurationException ex)
     {
         // expected
     }
 }