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 line break issues in unit tests when built in a different environment #70

Merged
merged 1 commit into from
Nov 7, 2017

Conversation

PerthCharern
Copy link
Contributor

  • Always call MakeLineBreaksEnvironmentNeutral before comparing actual and expected strings.

  • Change expect to expected in all places in unit tests

…ed and actual serialized strings

- change `expect` to `expected` in all places in unit tests
@msftclas
Copy link

msftclas commented Nov 7, 2017

@PerthCharern,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

Assert.Equal("name: Default Name", actual);
actual = actual.MakeLineBreaksEnvironmentNeutral();
expected = expected.MakeLineBreaksEnvironmentNeutral();
Assert.Equal(expected, actual);
Copy link
Contributor

Choose a reason for hiding this comment

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

I am wondering "You are stilling using XUnit.Assert? "

I think it's better to only use one framework. So, if the XUnit.Assert can't meet our requirement, we can extend it. Thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, in this PR, I don't want to change those existing Asserts yet. My plan is to move everything to FluentAssertions, unless you object. For future unit tests, are you comfortable with writing them using FluentAssertions?

Copy link
Contributor

Choose a reason for hiding this comment

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

Either is ok for me. But, only one. :)

@PerthCharern PerthCharern merged commit 734e1d7 into master Nov 7, 2017
@PerthCharern PerthCharern deleted the PerthCharern/FixLineBreakIssuesInUnitTests branch November 11, 2017 00:48
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.

None yet

3 participants