Esempio n. 1
0
        public void StressTest()
        {
            IProcessDefinitionService definitionComponent = null;

            for (int i = 1; i < 20; i++)
            {
                definitionComponent = ServiceLocator.Instance.GetService(typeof(IProcessDefinitionService)) as IProcessDefinitionService;
                IList definitions = definitionComponent.GetProcessDefinitions(null);
                Assert.IsNotNull(definitions);
                ServiceLocator.Instance.Release(definitionComponent);
            }
        }
Esempio n. 2
0
        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;
            }
        }