Date relative to current in the DBUnit dataset

前端 未结 4 1339
情话喂你
情话喂你 2021-02-04 08:09

I\'m wondering if there is any way to specify for example tomorrow as date in the DBUnit XML dataset. Sometimes code logic is different for dates in future and dates in the past

4条回答
  •  被撕碎了的回忆
    2021-02-04 08:36

    You can use add() of Calendar to define dates in the future and using this in relationship with datasource for JUnit. I doubt that this would work with DBUnit's XML format. May be you create your own TestCase which extends from DBTestCase and implement getDataSet() method.

提交回复
热议问题