// Resource tvResObj = model.createResource(new ResTestObjF());
// Bag tvBag = model.createBag();
// Alt tvAlt = model.createAlt();
// Seq tvSeq = model.createSeq();
final int num = 10;
final Seq seq = model.createSeq();
for (int i = 0; i < num; i++)
{
seq.add(i);
}
seq.set(5, AbstractModelTestBase.tvBoolean);
Assert.assertEquals(AbstractModelTestBase.tvBoolean, seq.getBoolean(5));
Assert.assertEquals(3, seq.getInt(4));
Assert.assertEquals(5, seq.getInt(6));
Assert.assertEquals(num, seq.size());
seq.set(5, AbstractModelTestBase.tvByte);
Assert.assertEquals(AbstractModelTestBase.tvByte, seq.getByte(5));
Assert.assertEquals(3, seq.getInt(4));
Assert.assertEquals(5, seq.getInt(6));
Assert.assertEquals(num, seq.size());
seq.set(5, AbstractModelTestBase.tvShort);
Assert.assertEquals(AbstractModelTestBase.tvShort, seq.getShort(5));
Assert.assertEquals(3, seq.getInt(4));
Assert.assertEquals(5, seq.getInt(6));
Assert.assertEquals(num, seq.size());
seq.set(5, AbstractModelTestBase.tvInt);
Assert.assertEquals(AbstractModelTestBase.tvInt, seq.getInt(5));
Assert.assertEquals(3, seq.getInt(4));
Assert.assertEquals(5, seq.getInt(6));
Assert.assertEquals(num, seq.size());
seq.set(5, AbstractModelTestBase.tvLong);
Assert.assertEquals(AbstractModelTestBase.tvLong, seq.getLong(5));
Assert.assertEquals(3, seq.getInt(4));
Assert.assertEquals(5, seq.getInt(6));
Assert.assertEquals(num, seq.size());
seq.set(5, AbstractModelTestBase.tvString);
Assert.assertEquals(AbstractModelTestBase.tvString, seq.getString(5));
Assert.assertEquals(3, seq.getInt(4));
Assert.assertEquals(5, seq.getInt(6));
Assert.assertEquals(num, seq.size());
seq.set(5, AbstractModelTestBase.tvBoolean);
Assert.assertEquals(AbstractModelTestBase.tvBoolean, seq.getBoolean(5));
Assert.assertEquals(3, seq.getInt(4));
Assert.assertEquals(5, seq.getInt(6));
Assert.assertEquals(num, seq.size());
seq.set(5, AbstractModelTestBase.tvFloat);
Assert.assertEquals(AbstractModelTestBase.tvFloat, seq.getFloat(5),
0.00005);
Assert.assertEquals(3, seq.getInt(4));
Assert.assertEquals(5, seq.getInt(6));
Assert.assertEquals(num, seq.size());
seq.set(5, AbstractModelTestBase.tvDouble);
Assert.assertEquals(AbstractModelTestBase.tvDouble, seq.getDouble(5),
0.000000005);
Assert.assertEquals(3, seq.getInt(4));
Assert.assertEquals(5, seq.getInt(6));
Assert.assertEquals(num, seq.size());
seq.set(5, tvLiteral);
Assert.assertEquals(tvLiteral, seq.getLiteral(5));
Assert.assertEquals(3, seq.getInt(4));
Assert.assertEquals(5, seq.getInt(6));
Assert.assertEquals(num, seq.size());
seq.set(5, tvResource);
Assert.assertEquals(tvResource, seq.getResource(5));
Assert.assertEquals(3, seq.getInt(4));
Assert.assertEquals(5, seq.getInt(6));
Assert.assertEquals(num, seq.size());
seq.set(5, AbstractModelTestBase.tvLitObj);
// assertEquals( tvLitObj, seq.getObject( 5, new LitTestObjF() ) );
Assert.assertEquals(3, seq.getInt(4));
Assert.assertEquals(5, seq.getInt(6));
Assert.assertEquals(num, seq.size());
// seq.set( 5, tvResObj );
// assertEquals( tvResObj, seq.getResource( 5, new ResTestObjF() ) );
// assertEquals( 3, seq.getInt( 4 ) );
// assertEquals( 5, seq.getInt( 6 ) );