private void writeEx1(ModelOutput<Ex1> output, int... sids) throws IOException { try { Ex1 value = new Ex1(); for (int sid : sids) { value.setSid(sid); value.setValue(sid); value.setStringAsString(String.valueOf(sid)); output.write(value); } } finally { output.close(); } }
private void writeTestData(ModelOutput<Ex1> source) throws IOException { Ex1 value = new Ex1(); source.write(value); value.setSid(1); source.write(value); value.setSid(2); source.write(value); value.setSid(3); source.write(value); value.setSid(4); source.write(value); value.setSid(5); source.write(value); value.setSid(6); source.write(value); value.setSid(7); source.write(value); value.setSid(8); source.write(value); value.setSid(9); source.write(value); }
private void checlValues(List<Ex1> results, int value) { for (Ex1 ex1 : results) { assertThat(ex1.getValueOption(), is(new IntOption(value))); } }