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

fix #178 InstanceOfType on null value #179

Merged
merged 3 commits into from
May 10, 2017
Merged

Conversation

LarsCelie
Copy link
Contributor

Not sure if the tests provided are desired, so i can remove them if necessary.

@msftclas
Copy link

msftclas commented May 9, 2017

@LarsCelie,
Thanks for your contribution.
To ensure that the project team has proper rights to use your work, please complete the Contribution License Agreement at https://cla.microsoft.com.

It will cover your contributions to all Microsoft-managed open source projects.
Thanks,
Microsoft Pull Request Bot

@msftclas
Copy link

msftclas commented May 9, 2017

@LarsCelie, thanks for signing the contribution license agreement. We will now validate the agreement and then the pull request.

Thanks, Microsoft Pull Request Bot

public void InstanceOfTypeShouldFailWhenValueIsNull()
{
Action action = () => TestFrameworkV2.Assert.IsInstanceOfType(null, typeof(AssertTests));
TestFrameworkV2.Assert.ThrowsException<TestFrameworkV2.AssertFailedException>(action);
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use ActionUtility.ActionShouldThrowExceptionOfType instead please. Any issue with ThrowsException would leave these tests in an indeterminate state too. Hence the ask.

}

[TestMethod]
public void InstanceOfTypeShouldFailWhenTypeIsNull()
Copy link
Contributor

Choose a reason for hiding this comment

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

If possible can we add a positive test too please?

@AbhitejJohn AbhitejJohn merged commit 1663b1b into microsoft:master May 10, 2017
singhsarab pushed a commit to singhsarab/testfx that referenced this pull request Apr 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants