예제 #1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void testExecutionInPAContextByName() throws Exception
        public virtual void testExecutionInPAContextByName()
        {
            Assert.assertNull(Context.CurrentProcessApplication);

            ProcessApplicationReference contextPA = ProcessApplicationContext.withProcessApplicationContext(new CallableAnonymousInnerClass(this)
                                                                                                            , pa.Name);

            Assert.assertEquals(contextPA.ProcessApplication, pa);

            Assert.assertNull(Context.CurrentProcessApplication);
        }
예제 #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void testCannotExecuteInUnregisteredPaContext() throws Exception
        public virtual void testCannotExecuteInUnregisteredPaContext()
        {
            string nonExistingName = pa.Name + pa.Name;

            try
            {
                ProcessApplicationContext.withProcessApplicationContext(new CallableAnonymousInnerClass4(this)
                                                                        , nonExistingName);
                fail("should not succeed");
            }
            catch (ProcessEngineException e)
            {
                assertTextPresent("A process application with name '" + nonExistingName + "' is not registered", e.Message);
            }
        }