public void TearDown() { _container.Dispose(); _container = null; serviceLocator = null; obj = null; }
public void ServiceLocatorStressTest() { for (int i=1;i<5;i++) { //configure the container NetBpmContainer container = new NetBpm.NetBpmContainer(new XmlInterpreter(TestHelper.GetConfigDir()+"app_config.xml")); IProcessDefinitionService definitionComponent = null; definitionComponent = ServiceLocator.Instance.GetService(typeof (IProcessDefinitionService)) as IProcessDefinitionService; IList definitions = definitionComponent.GetProcessDefinitions(null); Assert.IsNotNull(definitions); ServiceLocator.Instance.Release(definitionComponent); container.Dispose(); container=null; } }
public void ServiceLocatorStressTest() { for (int i = 1; i < 5; i++) { //configure the container NetBpmContainer container = new NetBpm.NetBpmContainer(new XmlInterpreter(TestHelper.GetConfigDir() + "app_config.xml")); IProcessDefinitionService definitionComponent = null; definitionComponent = ServiceLocator.Instance.GetService(typeof(IProcessDefinitionService)) as IProcessDefinitionService; IList definitions = definitionComponent.GetProcessDefinitions(null); Assert.IsNotNull(definitions); ServiceLocator.Instance.Release(definitionComponent); container.Dispose(); container = null; } }