e.printStackTrace();
}
t = new Tuple();
try {
t.read(new InputViewDataInputStreamWrapper(dis));
Assert.assertTrue(t.getNumberOfColumns() == 1);
Assert.assertTrue(t.getStringValueAt(0).equals("Hello world!"));
Assert.assertTrue(t.toString().equals("Hello world!|"));
} catch (IOException e) {
e.printStackTrace();
}
t = new Tuple();
try {
t.read(new InputViewDataInputStreamWrapper(dis));
Assert.assertTrue(t.getNumberOfColumns() == 2);
Assert.assertTrue(t.getStringValueAt(0).equals("Hello world!"));
Assert.assertTrue(t.getStringValueAt(1).equals("2ndAttribute"));
Assert.assertTrue(t.toString().equals("Hello world!|2ndAttribute|"));
} catch (IOException e) {
e.printStackTrace();
}
t = new Tuple();
try {
t.read(new InputViewDataInputStreamWrapper(dis));
Assert.assertTrue(t.getNumberOfColumns() == 5);
Assert.assertTrue(t.getStringValueAt(0).equals("attr1"));
Assert.assertTrue(t.getStringValueAt(1).equals("attr2"));
Assert.assertTrue(t.getLongValueAt(2) == 3);