static void deltaAssertion ( CallInfo callInfo , DataSet oldData , DataSet newData ) { validateDeltaAssertion ( oldData , newData ) ; final DataSource source = oldData . getSource ( ) ; final DB db = source . getDB ( ) ; final DataSet snapshot = source . getSnapshot ( ) ; final DataSet stateNow = source . executeQuery ( callInfo , false ) ; final Delta dbDelta = new Delta ( snapshot , stateNow ) ; final Delta oldDataMatch = new Delta ( oldData . getRows ( ) . iterator ( ) , dbDelta . deleted ( ) ) ; final Delta newDataMatch = new Delta ( newData . getRows ( ) . iterator ( ) , dbDelta . inserted ( ) ) ; final DeltaAssertion da = new DeltaAssertion ( oldData , newData , oldDataMatch , newDataMatch ) ; db . log ( callInfo , da ) ; source . setDirtyStatus ( ! da . passed ( ) || oldData . size ( ) > 0 || newData . size ( ) > 0 ) ; if ( ! da . passed ( ) ) { throw new DBAssertionError ( callInfo . getMessage ( ) ) ; } }
Perform a delta assertion .