Skip to content

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

Merged
jayaranigarg merged 5 commits into
microsoft:masterfrom
jayaranigarg:issue199_fix
Jul 6, 2018
Merged

Adding appropriate error message for TestMethods expecting parameters but parameters not provided#457
jayaranigarg merged 5 commits into
microsoft:masterfrom
jayaranigarg:issue199_fix

Conversation

@jayaranigarg

@jayaranigarg jayaranigarg commented Jun 27, 2018

Copy link
Copy Markdown
Member

@jayaranigarg jayaranigarg changed the title Adding appropriate error message Adding appropriate error message for TestMethods expecting parameters but parameters not provided Jun 27, 2018
<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
Copy Markdown
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
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done.

{
if (methodInfo.GetParameters() != null && parameters == null)
{
string errorMessage = string.Format(

Copy link
Copy Markdown
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
Copy Markdown
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. 👍

/// </param>
internal static void InvokeAsSynchronousTask(this MethodInfo methodInfo, object classInstance, params object[] parameters)
{
if (methodInfo.GetParameters() != null && parameters == null)

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member Author

@dotnet-bot Test Windows / Debug Build please

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