Only the table of the examples in a scenario outline should have test results#515
Conversation
* Pickles is unable to deal with Danish characters (picklesdoc#477) * Version 2.16.2
dirkrombauts
left a comment
There was a problem hiding this comment.
Thank you for your contribution. I have some ideas on how to improve the code, please take a look at them.
| actualResult = Regex.Replace(actualResult, @"\s+", string.Empty); | ||
| expectedResult = Regex.Replace(expectedResult, @"\s+", string.Empty); | ||
|
|
||
| Debug.Print(actualResult); |
There was a problem hiding this comment.
I don't like debug statements left after the debug session :-)
| // -------------------------------------------------------------------------------------------------------------------- | ||
|
|
||
| using System; | ||
| using System.Diagnostics; |
There was a problem hiding this comment.
We won't need this one anymore after you remove the Debug statement
| AddRange(cells); | ||
| this.Result = result; | ||
| Add(result); | ||
| if (result != null) |
There was a problem hiding this comment.
Why do we need a null check?
|
|
||
| } | ||
|
|
||
| public class TestTableRow : TableRow |
There was a problem hiding this comment.
TestTableRow sounds like it's a table for testing purposes. I prefer a name like "TableRowWithTestResult" or something like that.
| } | ||
|
|
||
| public TableRow MapToTableRow(G.TableRow tableRow) | ||
| public TableRow MapToTableRow(G.TableRow tableRow, bool isForExample=false) |
There was a problem hiding this comment.
The isForExample parameter is a code smell to me. You're steering the behavior of the class depending on this parameter. Is would prefer having a method MapToTableRow and another one MapToTableRowWithTestData and let the caller of the method decide which variant to use. The caller already makes that decision when they determine the value for isForExample, there is no need to make the same decision twice.
|
you are entirely right, i'm fixing and repushing. I was a bit lazy on this one |
|
Hi, Sorry to ask, but is there any progress on this issue ? Regards, |
|
I have scheduled some Pickles time today, I hope I'll be able to work through most of the pull requests. |
|
Released in version 2.18.1. |
|
Thanks! |
Hello,
To fix #514 I created an ExampleTable which have TestDataRows in the Example Object.
Only this kind of Table is expected to have Json containing results.
Today you have:

After you will get back to having

No change on Scenraio Ouline results
Hope I didn't miss any thing, all tests are ok.
Regards,