Skip to content

Instantly share code, notes, and snippets.

@andyczerwonka
Created August 21, 2017 15:44
Show Gist options
  • Save andyczerwonka/26cae69bf3da72a77cecfab11bed6bc3 to your computer and use it in GitHub Desktop.
Save andyczerwonka/26cae69bf3da72a77cecfab11bed6bc3 to your computer and use it in GitHub Desktop.
@Test
public void test_singleProductRequested() {
production(10, "Gas", "mcf/d", "2013-01-01", "2014-01-01", 1000.0);
txn.dataBuilder().shrinkage(_project).assetProduct(_asset, "Gas").shrinkage(2013, 3, 1.0)
.shrinkage(2013, 6, 0.0).end();
_test //
.raw("mcf", "Gas") //
.sales("mcf", "Gas") //
.expect("Asset: Well 1", //
"raw mcf Gas", //
" monthly 2013-01 31000.0 28000.0 31000.0 30000.0 31000.0 30000.0 31000.0 31000.0 30000.0 31000.0 30000.0 31000.0", //
" daily 2013-01 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0", //
"sales mcf Gas", //
" monthly 2013-01 31000.0 28000.0 0.0 0.0 0.0 30000.0 31000.0 31000.0 30000.0 31000.0 30000.0 31000.0", //
" daily 2013-01 1000.0 1000.0 0.0 0.0 0.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0 1000.0" //
);
}
@andyczerwonka
Copy link
Author

The expect is basically a string compare, and the diff tool is awesome to point out which piece of data is different. Formatting remains, numbers change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment