()
| 47 | private static final BinInterSedes bis = new BinInterSedes(); |
| 48 | |
| 49 | @Test |
| 50 | public void testTupleFormat() { |
| 51 | |
| 52 | try { |
| 53 | Tuple tuple = mTupleFactory.newTuple(7); |
| 54 | tuple.set(0, 12); |
| 55 | Map<String, String> map = new HashMap<String, String>(); |
| 56 | map.put("pig", "scalability"); |
| 57 | tuple.set(1, map); |
| 58 | tuple.set(2, null); |
| 59 | tuple.set(3, 12L); |
| 60 | tuple.set(4, 1.2F); |
| 61 | |
| 62 | Tuple innerTuple = mTupleFactory.newTuple(1); |
| 63 | innerTuple.set(0, "innerTuple"); |
| 64 | tuple.set(5, innerTuple); |
| 65 | |
| 66 | DataBag bag = BagFactory.getInstance().newDefaultBag(); |
| 67 | bag.add(innerTuple); |
| 68 | tuple.set(6, bag); |
| 69 | |
| 70 | assertEquals( |
| 71 | "(12,[pig#scalability],,12,1.2,(innerTuple),{(innerTuple)})", |
| 72 | TupleFormat.format(tuple)); |
| 73 | } catch (ExecException e) { |
| 74 | e.printStackTrace(); |
| 75 | fail(); |
| 76 | } |
| 77 | |
| 78 | } |
| 79 | |
| 80 | @Test |
| 81 | public void testEmptyTupleSize() { |
nothing calls this directly
no test coverage detected