//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public Object answer(org.mockito.invocation.InvocationOnMock invocation) throws Throwable
            public override object Answer(InvocationOnMock invocation)
            {
                object[]          arguments = invocation.Arguments;
                ConsistencyReport report    = (( CheckerEngine )arguments[arguments.Length - 2]).report();

                try
                {
                    return(Method.invoke(report, Parameters(Method)));
                }
                catch (System.ArgumentException ex)
                {
                    throw new System.ArgumentException(format("%s.%s#%s(...)", report, Method.DeclaringClass.SimpleName, Method.Name), ex);
                }
            }
Example #2
0
 public EngineAnonymousInnerClass(RecordAccessStub outerInstance, ConsistencyReport report, AbstractBaseRecord record) : base(outerInstance, report)
 {
     this.outerInstance = outerInstance;
     this._record       = record;
 }