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

Fixing issue #1709 #1711

Closed
wants to merge 0 commits into from
Closed

Fixing issue #1709 #1711

wants to merge 0 commits into from

Conversation

asgerhallas
Copy link
Contributor

No description provided.

Copy link
Member

@thomaslevesque thomaslevesque left a comment

Choose a reason for hiding this comment

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

Excellent, @asgerhallas, thanks! I have no comments about the code itself.
Just two remarks:

  • We've introduced a few breaking changes on master not long ago, which means the next release from master will be 6.0.0. We're not quite ready to release it yet, though, which means your changes won't be released for a while if we merge them to master. If you'd like to see it released sooner, could you please rebase your work onto the support/5.x branch and submit another PR to that branch? We'll then release a minor 5.x version from there.
  • The FakeItEasy.Tests project is mostly legacy. We try to move away from "low-level" unit tests and usually avoid adding new tests to this project.; we use BDD specs instead (see the FakeItEasy.Specs project). Would you mind changing your tests to specs? (in the FakeSpecs class, I think)

Copy link
Member

@blairconrad blairconrad left a comment

Choose a reason for hiding this comment

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

Thanks, @asgerhallas. I made a few comments to add onto @thomaslevesque's. It may seem like a lot, but they're generally quite small adjustments I'm asking for. (And some comments may even evaporate when the tests move to specs.)
Overall, I quite enjoyed your changes.

docs/advanced-usage.md Outdated Show resolved Hide resolved
src/FakeItEasy/Fake.cs Outdated Show resolved Hide resolved
src/FakeItEasy/Fake.cs Outdated Show resolved Hide resolved
src/FakeItEasy/Fake.cs Outdated Show resolved Hide resolved
src/FakeItEasy/Fake.cs Outdated Show resolved Hide resolved
src/FakeItEasy/Fake.cs Outdated Show resolved Hide resolved
@@ -1,3 +1,6 @@
using FakeItEasy.Core;
using FluentAssertions;
Copy link
Member

Choose a reason for hiding this comment

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

Probably won't be an issue once the tests get moved to Specs as @thomaslevesque has requested, but our convention is to put usings inside the namespace, like using System below.

Copy link
Member

Choose a reason for hiding this comment

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

Still need to move those inside the namespace

tests/FakeItEasy.Tests/FakeTests.cs Outdated Show resolved Hide resolved
tests/FakeItEasy.Tests/FakeTests.cs Outdated Show resolved Hide resolved
@asgerhallas
Copy link
Contributor Author

  • The FakeItEasy.Tests project is mostly legacy. We try to move away from "low-level" unit tests and usually avoid adding new tests to this project.; we use BDD specs instead (see the FakeItEasy.Specs project). Would you mind changing your tests to specs? (in the FakeSpecs class, I think)

Ha, I was a little surprised by the sparseness of those FakeTests... this explains it :)

Copy link
Member

@thomaslevesque thomaslevesque left a comment

Choose a reason for hiding this comment

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

Hi @asgerhallas,

Thanks for the changes. Almost there, just a few more minor comments!

"Given a fake object"
.x(() => fake = A.Fake<object>());

"And I try to get the FakeManager for that object"
Copy link
Member

Choose a reason for hiding this comment

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

"And" => "When"

Specs follow the Given-When-Then pattern

"Given a non-fake object"
.x(() => notFake = new object());

"And I try to get the FakeManager for that object"
Copy link
Member

Choose a reason for hiding this comment

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

When

"Given a fake object"
.x(() => fake = A.Fake<object>());

"And I check if that object is fake"
Copy link
Member

Choose a reason for hiding this comment

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

When

@@ -1,3 +1,6 @@
using FakeItEasy.Core;
using FluentAssertions;
Copy link
Member

Choose a reason for hiding this comment

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

Still need to move those inside the namespace

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