I was getting the following error when running my tests using SpecFlow:
System.FormatException: Input string was not in a correct format.
And it took me a while to work out why it was happening.
It ended up being because I had omitted the single quotes in one of my step definitions, for example:
[Then(@"Something adds up to a quantity of (.*)")]
when it should have been
[Then(@"Something adds up to a quantity of '(.*)'")]
Note the single quotes around (.*)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With