2

I need help to solve a unit testing problem using DBUnit. In my code I call nextvalue of the sequence.

This is failing as expected as my xml is not correct.

I have a schema /dtd as expected with table elements. and the in xml works ok.

But I want test my sequence also. some article are giving answers on how to reset Reset sequence in DBUnit?

 <?xml version='1.0' encoding='UTF-8'?>
    <dataset reset_sequences="emp_seq, dept_seq">
        <emp empno="1" ename="Scott" deptno="10" job="project manager" />
        ....
    </dataset>

But my insert happens via code, and the dataset or other element should help me get next value (i.e. the sequence should exist)

How can I declare/define a sequence wither in DTD or dataset XML

I could not find an answer. So please dont brand me lazy. I use only XML in this scenario . Please help

How to use Oracle Sequence Numbers in DBUnit?

https://github.com/springtestdbunit/spring-test-dbunit/pull/30

Kris Swat
  • 788
  • 1
  • 10
  • 39

0 Answers0