简体   繁体   中英

dbfit - How to assert that an item is not returned in the results

I am creating dbfit test cases and I encountered a scenario where I need to check that an item is not included in the results returned by the query. How can I do that?

Thanks,

If you carry out a query to count the number of records that are matching your query then you can check that the result is zero something like

|query |select count(id) as NumberOfRecords from dbo.tablename where criteria='matched'| |NumberOfRecords | |0 |

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM