testLanguagedString(model, "chat", "fr");
}
protected void testLong( final Model model, final long tv )
{
final Literal l = model.createTypedLiteral(tv);
try
{
Assert.assertEquals(tv, l.getByte());
assertInRange(Byte.MIN_VALUE, tv, Byte.MAX_VALUE);
}
catch (final NumberFormatException e)
{
assertOutsideRange(Byte.MIN_VALUE, tv, Byte.MAX_VALUE);
}
catch (final IllegalArgumentException e)
{
assertOutsideRange(Byte.MIN_VALUE, tv, Byte.MAX_VALUE);
}
try
{
Assert.assertEquals(tv, l.getShort());
assertInRange(Short.MIN_VALUE, tv, Short.MAX_VALUE);
}
catch (final NumberFormatException e)
{
assertOutsideRange(Short.MIN_VALUE, tv, Short.MAX_VALUE);
}
catch (final IllegalArgumentException e)
{
assertOutsideRange(Short.MIN_VALUE, tv, Short.MAX_VALUE);
}
try
{
Assert.assertEquals(tv, l.getInt());
assertInRange(Integer.MIN_VALUE, tv, Integer.MAX_VALUE);
}
catch (final NumberFormatException e)
{
assertOutsideRange(Integer.MIN_VALUE, tv, Integer.MAX_VALUE);
}
catch (final IllegalArgumentException e)
{
assertOutsideRange(Integer.MIN_VALUE, tv, Integer.MAX_VALUE);
}
Assert.assertEquals(tv, l.getLong());
}