public CommandAnonymousInnerClass2(CommandContextInterceptorTest outerInstance,
                                    ExceptionThrowingCmd innerCommand1, ExceptionThrowingCmd innerCommand2)
 {
     _outerInstance = outerInstance;
     _innerCommand1 = innerCommand1;
     _innerCommand2 = innerCommand2;
 }
Esempio n. 2
0
        public virtual void testCommandContextNestedTryCatch()
        {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final ExceptionThrowingCmd innerCommand = new ExceptionThrowingCmd(new IdentifiableRuntimeException(1));
            ExceptionThrowingCmd innerCommand = new ExceptionThrowingCmd(this, new IdentifiableRuntimeException(this, 1));

            processEngineConfiguration.CommandExecutorTxRequired.execute(new CommandAnonymousInnerClass3(this, innerCommand));
        }
Esempio n. 3
0
        public virtual void testCommandContextNestedFailingCommands()
        {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final ExceptionThrowingCmd innerCommand1 = new ExceptionThrowingCmd(new IdentifiableRuntimeException(1));
            ExceptionThrowingCmd innerCommand1 = new ExceptionThrowingCmd(this, new IdentifiableRuntimeException(this, 1));
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final ExceptionThrowingCmd innerCommand2 = new ExceptionThrowingCmd(new IdentifiableRuntimeException(2));
            ExceptionThrowingCmd innerCommand2 = new ExceptionThrowingCmd(this, new IdentifiableRuntimeException(this, 2));

            try
            {
                processEngineConfiguration.CommandExecutorTxRequired.execute(new CommandAnonymousInnerClass2(this, innerCommand1, innerCommand2));

                fail("Exception expected");
            }
            catch (IdentifiableRuntimeException e)
            {
                assertEquals(1, e.id);
            }

            assertTrue(innerCommand1.executed);
            assertFalse(innerCommand2.executed);
        }
 public CommandAnonymousInnerClass3(CommandContextInterceptorTest outerInstance,
                                    ExceptionThrowingCmd innerCommand)
 {
     _outerInstance = outerInstance;
     _innerCommand  = innerCommand;
 }