add unit/integrted tests for dpc

I think it's the problem of the input data. 

I generate xdata and the 2 fitting variables first. Then calculate ydata.