Search in sources :

Example 1 with FakeSymbolToken

use of com.amazon.ion.FakeSymbolToken in project ion-java by amzn.

the class IonWriterTestCase method testWriteSymbolTokenWithBadSid.

@Test(expected = IllegalArgumentException.class)
public void testWriteSymbolTokenWithBadSid() throws Exception {
    iw = makeWriter();
    // Using FakeSymbolToken instead of new SymbolTokenImpl as
    // newSymbolToken(...) throws an AssertionError during construction
    // before it reaches the code-block that throws IllegalArgumentException
    // during writing.
    iw.writeSymbolToken(new FakeSymbolToken(null, -12));
}
Also used : FakeSymbolToken(com.amazon.ion.FakeSymbolToken) Test(org.junit.Test)

Aggregations

FakeSymbolToken (com.amazon.ion.FakeSymbolToken)1 Test (org.junit.Test)1