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

Adding appropriate error message for TestMethods expecting parameters but parameters not provided #457

Merged
merged 5 commits into from
Jul 6, 2018

Conversation

jayaranigarg
Copy link
Member

@jayaranigarg jayaranigarg commented Jun 27, 2018

@jayaranigarg jayaranigarg changed the title Adding appropriate error message Adding appropriate error message for TestMethods expecting parameters but parameters not provided Jun 27, 2018
@@ -313,4 +313,7 @@
<data name="TestAssembly_AssemblyDiscoveryFailure" xml:space="preserve">
<value>Failed to discover tests from assembly {0}. Reason:{1}</value>
</data>
<data name="UTA_TestMethodExpectedParameters" xml:space="preserve">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Xlf file changes?
@pvlakshm Please review the string

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@@ -143,6 +145,14 @@ internal static string GetAsyncTypeName(this MethodInfo method)
/// </param>
internal static void InvokeAsSynchronousTask(this MethodInfo methodInfo, object classInstance, params object[] parameters)
{
if (methodInfo.GetParameters() != null && parameters == null)
{
string errorMessage = string.Format(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ResourceManager takes care of culture, do we need this formating?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Validated on a DEU machine. ResourceManager working expectedly. 👍

@@ -143,6 +145,14 @@ internal static string GetAsyncTypeName(this MethodInfo method)
/// </param>
internal static void InvokeAsSynchronousTask(this MethodInfo methodInfo, object classInstance, params object[] parameters)
{
if (methodInfo.GetParameters() != null && parameters == null)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please explain the parameters null check

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added comments.

@jayaranigarg
Copy link
Member Author

@dotnet-bot Test Windows / Debug Build please

@jayaranigarg jayaranigarg merged commit f3417a8 into microsoft:master Jul 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants