An exception is thrown if the input for a field, or the expected value of a method, is of the wrong type.

Specify
CalculateFixtureUnderTest
aplus
one
fitSharp.Machine.Exception.ParseException`1[fitSharp.Machine.Model.Cell]: Parse parameter 1 for 'plusA' type System.Int32 failed. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.FormatException: Input string was not in a correct format. at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) at System.Int32.Parse(String s) --- End of inner exception stack trace --- at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams) at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args) at fitSharp.Machine.Engine.MethodMember.Invoke(Object[] parameters) at fitSharp.Machine.Engine.DefaultParse`2.Parse(Type type, TypedValue instance, Tree`1 parameters) at fitSharp.Machine.Engine.ProcessorBase`2.<>c__DisplayClasse.b__d(ParseOperator`1 o) at fitSharp.Machine.Engine.Operators`2.Do[O](CanDoOperation`1 canDoOperation, DoOperation`1 doOperation) at fitSharp.Machine.Engine.ProcessorBase`2.Parse(Type type, TypedValue instance, Tree`1 parameters) at fitSharp.Fit.Operators.ParseDefault.Parse(Type type, TypedValue instance, Tree`1 parameters) at fitSharp.Machine.Engine.ProcessorBase`2.<>c__DisplayClasse.b__d(ParseOperator`1 o) at fitSharp.Machine.Engine.Operators`2.Do[O](CanDoOperation`1 canDoOperation, DoOperation`1 doOperation) at fitSharp.Machine.Engine.ProcessorBase`2.Parse(Type type, TypedValue instance, Tree`1 parameters) at fitSharp.Machine.Engine.DefaultRuntime`2.<>c__DisplayClass1.b__0(List`1 parameterList, Tree`1 parameter) --- End of inner exception stack trace --- at fitSharp.Machine.Engine.DefaultRuntime`2.<>c__DisplayClass1.b__0(List`1 parameterList, Tree`1 parameter) at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable`1 source, TAccumulate seed, Func`3 func) at fitSharp.Machine.Engine.DefaultRuntime`2.GetParameterList(TypedValue instance, Tree`1 parameters, RuntimeMember member) at fitSharp.Machine.Engine.DefaultRuntime`2.Invoke(TypedValue instance, String memberName, Tree`1 parameters) at fitSharp.Machine.Engine.ProcessorBase`2.<>c__DisplayClass16.b__15(RuntimeOperator`1 o) at fitSharp.Machine.Engine.Operators`2.Do[O](CanDoOperation`1 canDoOperation, DoOperation`1 doOperation) at fitSharp.Machine.Engine.ProcessorBase`2.Invoke(TypedValue instance, String memberName, Tree`1 parameters) at fitSharp.Machine.Engine.ProcessorExtension.InvokeWithThrow[T](Processor`1 processor, TypedValue instance, String memberName, Tree`1 parameters) at fitSharp.Fit.Operators.CellOperator.GetTypedActual(ExecuteContext context, ExecuteParameters parameters)
one
CalculateFixtureUnderTest
aplus
one
one

(.NET: ignore expected value if not checked. Added tests for combinations of parse errors.)

Specify
CalculateFixtureUnderTest
aplusplusdouble
one
fitSharp.Machine.Exception.ParseException`1[fitSharp.Machine.Model.Cell]: Parse parameter 1 for 'plusA' type System.Int32 failed. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.FormatException: Input string was not in a correct format. at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) at System.Int32.Parse(String s) --- End of inner exception stack trace --- at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams) at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args) at fitSharp.Machine.Engine.MethodMember.Invoke(Object[] parameters) at fitSharp.Machine.Engine.DefaultParse`2.Parse(Type type, TypedValue instance, Tree`1 parameters) at fitSharp.Machine.Engine.ProcessorBase`2.<>c__DisplayClasse.b__d(ParseOperator`1 o) at fitSharp.Machine.Engine.Operators`2.Do[O](CanDoOperation`1 canDoOperation, DoOperation`1 doOperation) at fitSharp.Machine.Engine.ProcessorBase`2.Parse(Type type, TypedValue instance, Tree`1 parameters) at fitSharp.Fit.Operators.ParseDefault.Parse(Type type, TypedValue instance, Tree`1 parameters) at fitSharp.Machine.Engine.ProcessorBase`2.<>c__DisplayClasse.b__d(ParseOperator`1 o) at fitSharp.Machine.Engine.Operators`2.Do[O](CanDoOperation`1 canDoOperation, DoOperation`1 doOperation) at fitSharp.Machine.Engine.ProcessorBase`2.Parse(Type type, TypedValue instance, Tree`1 parameters) at fitSharp.Machine.Engine.DefaultRuntime`2.<>c__DisplayClass1.b__0(List`1 parameterList, Tree`1 parameter) --- End of inner exception stack trace --- at fitSharp.Machine.Engine.DefaultRuntime`2.<>c__DisplayClass1.b__0(List`1 parameterList, Tree`1 parameter) at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable`1 source, TAccumulate seed, Func`3 func) at fitSharp.Machine.Engine.DefaultRuntime`2.GetParameterList(TypedValue instance, Tree`1 parameters, RuntimeMember member) at fitSharp.Machine.Engine.DefaultRuntime`2.Invoke(TypedValue instance, String memberName, Tree`1 parameters) at fitSharp.Machine.Engine.ProcessorBase`2.<>c__DisplayClass16.b__15(RuntimeOperator`1 o) at fitSharp.Machine.Engine.Operators`2.Do[O](CanDoOperation`1 canDoOperation, DoOperation`1 doOperation) at fitSharp.Machine.Engine.ProcessorBase`2.Invoke(TypedValue instance, String memberName, Tree`1 parameters) at fitSharp.Machine.Engine.ProcessorExtension.InvokeWithThrow[T](Processor`1 processor, TypedValue instance, String memberName, Tree`1 parameters) at fitSharp.Fit.Operators.CellOperator.GetTypedActual(ExecuteContext context, ExecuteParameters parameters)
oneoneoneone
11one
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.FormatException: Input string was not in a correct format. at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) at System.Int32.Parse(String s) --- End of inner exception stack trace --- at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams) at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args) at fitSharp.Machine.Engine.MethodMember.Invoke(Object[] parameters) at fitSharp.Machine.Engine.DefaultParse`2.Parse(Type type, TypedValue instance, Tree`1 parameters) at fitSharp.Machine.Engine.ProcessorBase`2.<>c__DisplayClasse.b__d(ParseOperator`1 o) at fitSharp.Machine.Engine.Operators`2.Do[O](CanDoOperation`1 canDoOperation, DoOperation`1 doOperation) at fitSharp.Machine.Engine.ProcessorBase`2.Parse(Type type, TypedValue instance, Tree`1 parameters) at fitSharp.Fit.Operators.ParseDefault.Parse(Type type, TypedValue instance, Tree`1 parameters) at fitSharp.Machine.Engine.ProcessorBase`2.<>c__DisplayClasse.b__d(ParseOperator`1 o) at fitSharp.Machine.Engine.Operators`2.Do[O](CanDoOperation`1 canDoOperation, DoOperation`1 doOperation) at fitSharp.Machine.Engine.ProcessorBase`2.Parse(Type type, TypedValue instance, Tree`1 parameters) at fitSharp.Machine.Engine.ProcessorExtension.ParseTree[T](Processor`1 processor, Type type, Tree`1 parameters) at fitSharp.Fit.Operators.CompareDefault.Compare(TypedValue actual, Tree`1 expected) at fitSharp.Machine.Engine.ProcessorBase`2.<>c__DisplayClass2.b__1(CompareOperator`1 o) at fitSharp.Machine.Engine.Operators`2.Do[O](CanDoOperation`1 canDoOperation, DoOperation`1 doOperation) at fitSharp.Machine.Engine.ProcessorBase`2.Compare(TypedValue instance, Tree`1 parameters) at fitSharp.Fit.Operators.ExecuteDefault.Check(ExecuteContext context, ExecuteParameters parameters) at fitSharp.Fit.Operators.ExecuteDefault.Execute(ExecuteContext context, ExecuteParameters parameters) at fitSharp.Fit.Operators.ExecuteBase.Execute(TypedValue instance, Tree`1 parameters) at fitSharp.Machine.Engine.ProcessorBase`2.<>c__DisplayClassa.b__9(ExecuteOperator`1 o) at fitSharp.Machine.Engine.Operators`2.Do[O](CanDoOperation`1 canDoOperation, DoOperation`1 doOperation) at fitSharp.Machine.Engine.ProcessorBase`2.Execute(TypedValue instance, Tree`1 parameters) at fitSharp.Fit.Service.CellOperationImpl.Check(Object systemUnderTest, Tree`1 memberName, Tree`1 parameters, Tree`1 expectedCell) at fitlibrary.CalculateFixture.DoRow(Parse theRow)
11
CalculateFixtureUnderTest
aplusplusdouble
one
oneoneoneone
11one
11


[Front Page] [Recent Changes]