question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Inconsistent use of the # sign in error messages

See original GitHub issue

As you can see in the following example, the error message tries to be very natural in its language. This should also be applied to the 2nd number in the text #7.

Have it be “never”, “once”, “n times” like the first number.

Assertion failed for the following call:
    SomeMethodName()
  Expected to find it exactly 6 times but found it #7 times among the calls:
[...]

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
blairconradcommented, Dec 8, 2017

Which variant would you choose?

Good question! I’d been thinking about it. The switch is a little bit of work, but I think maybe

Expected to find it at least twice but found it {once/twice/n times} among the calls

I mean, “1 times” would read funny anyhow, so if you’re going to have to switch, why not match the language of our built-in convenience methods?

I would change the code here and add a switch for case A or just remove the # sign for B https://github.com/FakeItEasy/FakeItEasy/blob/master/src/FakeItEasy/Core/FakeAsserter.cs#L64

Sounds fantastic. Note that a number of tests will break when you do this, but for all the right reasons 😉.

0reactions
blairconradcommented, Feb 6, 2018

This change has been released as part of FakeItEasy 4.4.0.

Thanks for your help with this, @mertsch. Look for your name in the release notes! 🏆

Read more comments on GitHub >

github_iconTop Results From Across the Web

Inconsistent use of punctuation in error messages
Inconsistent use of punctuation in error messages: seconds vs seconds. Example with "seconds.": seconds. (has period) picture.
Read more >
Solved: I have Inconsistent error messages and can't make
I have Inconsistent error messages and can't make sense of the Log files. ‎11-21-2017 06:35 AM. I have a bit of a saga...
Read more >
Inconsistencies with the prompted error messages on b2c ...
When user does not add any values to the email & password fields, and clicks “Sign In” button, the error message displayed under...
Read more >
Various Login Screen Error Messaging is inconsistent #653
The current login screens are handling error messaging such as failed login validation, mistyping, etc. two different ways.
Read more >
What causes an error with the message "inconsistent use ...
In general, the answer to "what causes an error with the message X?" is that your code is/does X, and shouldn't. If you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found