0

My shop uses Fitnesse dbfit to test oracle database tables and stored procedures. I can do procedure calls, inserts, updates, executes, queries and it was fine until now.

How do I test for certain cells in query result not being null?

If I write null and I expect null then it is fine.

I tried fail[null] but I just get NumberFormatException.

!|Query|Select -690001 as C1, null as c2 from dual|
|C1|C2|
|fail[null]|null|

I have also tried to use !=, <>, 'not null', 'is not null', 'not blank'...

Also, if i call a procedure and expect one of out parameters to be anything other than null value. How would I do that?

user1941235
  • 113
  • 1
  • 10

1 Answers1

0

For anyone else coming across this problem, you need to add a question mark in the second row. This tells DbFit to compare the values.

In below test:

!|Query|Select -690001 as C1, null as c2 from dual|
|C1?|C2?|
|fail[null]|fail[null]|

C1 test would pass (as value is not null)

C2 test would fail (as value is null)

Jamuck
  • 1