Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optional Test Parameters of string cannot be defaulted to null #4

Open
PhillipPruett opened this issue Apr 15, 2016 · 0 comments
Open

Comments

@PhillipPruett
Copy link
Collaborator

Exception in thrown on MapTestRoutes call.
This very likely is the case for more than just strings.

[ArgumentException: Expression of type 'System.Object' cannot be used for parameter of type 'System.String' of method 'System.Threading.Tasks.Task1[System.Object] CreateCustomClock(System.String)']
System.Linq.Expressions.Expression.ValidateOneArgument(MethodBase method, ExpressionType nodeKind, Expression arg, ParameterInfo pi) +4401680
System.Linq.Expressions.Expression.ValidateArgumentTypes(MethodBase method, ExpressionType nodeKind, ReadOnlyCollection1& arguments) +138 System.Linq.Expressions.Expression.Call(Expression instance, MethodInfo method, IEnumerable1 arguments) +70
Its.Log.Monitoring.TestDefinition1.BuildTestMethodExpression(MethodInfo methodInfo, IEnumerable1 parameters) +213
Its.Log.Monitoring.TestDefinition`1..ctor(MethodInfo methodInfo) +300

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +243
System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) +1065
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +124
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +20
Its.Log.Monitoring.TestDefinition.Create(MethodInfo methodInfo) +138
System.Linq.WhereSelectArrayIterator2.MoveNext() +58 System.Linq.<SelectManyIterator>d__162.MoveNext() +227
Its.Log.Monitoring.TestDiscovery.GetTestDefinitions(IEnumerable1 monitoringTests) +341 Its.Log.Monitoring.HttpConfigurationExtensions.MapTestRoutes(HttpConfiguration configuration, Action1 configureTargets, String baseUri, IEnumerable1 testTypes, HttpMessageHandler handler, String testUiScriptUrl, IEnumerable1 testUiLibraryUrls) +754
Microsoft.Datamarket.Monitoring.Web.Startup.Configuration(IAppBuilder app) in C:\Git\monitoring\Monitor.Web\Startup.cs:469

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +92
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +101
System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +21
Owin.Loader.<>c__DisplayClass12.b__b(IAppBuilder builder) +77
Owin.Loader.<>c__DisplayClass1.b__0(IAppBuilder builder) +139
Microsoft.Owin.Host.SystemWeb.<>c__DisplayClass2.b__0(IAppBuilder builder) +69
Microsoft.Owin.Host.SystemWeb.OwinAppContext.Initialize(Action1 startup) +546 Microsoft.Owin.Host.SystemWeb.OwinBuilder.Build(Action1 startup) +58
Microsoft.Owin.Host.SystemWeb.OwinHttpModule.InitializeBlueprint() +95
System.Threading.LazyInitializer.EnsureInitializedCore(T& target, Boolean& initialized, Object& syncLock, Func1 valueFactory) +115 System.Threading.LazyInitializer.EnsureInitialized(T& target, Boolean& initialized, Object& syncLock, Func1 valueFactory) +72
Microsoft.Owin.Host.SystemWeb.OwinHttpModule.Init(HttpApplication context) +96
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +534
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +339
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296

[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9946132
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +90
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +261`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant