Closed saviourofdp closed 3 years ago
Sorry I am an idiot (blank)
is what I was looking for. Case Closed.
Oops. That didn't work either
NBi.NUnit.Runtime.CustomStackTraceAssertionException : Execution of the query doesn't match the expected result
Expected: Result-set with 1 row
#0 (Column0) KEY (Text) ------------ (blank)
But was:
Result-set with 1 row#0 ([MarketWarning]) KEY (Text) -------------------- (1 space)
Hi @saviourofdp ,
could you try to use a Space wrapped in a CDATA-Tag? That would enfoce the Space, I believe. That might not be the ideal solution, but what comes to my mind.
for your other question: The tolerance just describes with which difference a test would still pass for decimal values. You have a string, as far as I understand.
Cheers, Tilo
Thanks @FuegoArtificial I will try the CDATA tag.
If I had an inline dataset with multiple data types eg
<equal-to>
<result-set>
<row>
<cell>text 1</cell>
<cell>0.090234234</cell>
</row>
<row>
<cell>text 2</cell>
<cell>1.43443443</cell>
</row>
</result-set>
</equal-to>
where would the tolerance attribute go?
Thanks
NBi is trimming the content of the cell in an embedded result-set. There is no way to work-around this.
Nevertheless, you were right about the usage of (blank)
, this is the way to handle these cases with whitespaces. The issue here is that your column is considered as a key and not as a value. It sounds that you only have one row returned by the query so I'd switch to a behaviour single row that will let you play only with values.
Regarding tolerance, you must specify a column
(with index equal to 1 in your case) and the tolerance you want to apply to this column.
Could you close the issue if it's fixing your problem?
Hi I have a test like the following in which the query should return a single space. How do I test for this with an inline result set? This fails
As you can see I tried the
xml:space="preserve"
attribute. I also tried replacing the space in the resultset with the term "(1 space)" (thinking it might be undocumented special value like (empty) and (null)).Also additional question (I can create a new issue if you prefer) : where does tolerence="0.00001" go for an inline resultset?