首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > JUnit断言数据库测试

JUnit断言数据库测试

  • 资源大小:101.81 kB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:1次
  • 资源积分:1积分
  • 标      签: 测试 数据库 junit 断言

资 源 简 介

Database testing easily in jUnit DbAssert is a set of assertion methods for jUnit tests to verify your database data. It uses non-intrusive way for writing unit tests, you don"t have to extend any specific class to be able to query and test your database. Initialize DbAssert and start making assertions against your database right away. ### Assert data ### ``` //Initialize DbAssert by passing YAML file defining the datasources. dbAssert = DbAssert.init("org/testfw/Sources.yml"); //Set condition to search record by. dbAssert.table("authors").where("id", 123).and("last_name", "Coupland") ; // assert customers name column equals Douglas value in database. dbAssert.assert_column("name", "Douglas"); //checks field name contains non-empty value dbAssert.assertnotempty("bio"); // check if count of records returned more than one dbAssert.assertco

相 关 资 源

您 可 能 感 兴 趣 的

同 类 别 推 荐

VIP VIP
0.161651s