use of com.amazon.ion.Span in project ion-java by amzn.
the class FacetsTest method assumeFacetThrowsOnNullFacted.
@Test(expected = UnsupportedFacetException.class)
public void assumeFacetThrowsOnNullFacted() {
Faceted subject = null;
// We want this assignment idiom to work
@SuppressWarnings("unused") Span n = assumeFacet(Span.class, subject);
}
use of com.amazon.ion.Span in project ion-java by amzn.
the class FacetsTest method assumeFacetThrowsOnNullObject.
@Test(expected = UnsupportedFacetException.class)
public void assumeFacetThrowsOnNullObject() {
Object subject = null;
// We want this assignment idiom to work
@SuppressWarnings("unused") Span n = assumeFacet(Span.class, subject);
}
use of com.amazon.ion.Span in project ion-java by amzn.
the class NonOffsetSpanReaderTest method noOffsetSpanFacet.
@Test
public void noOffsetSpanFacet() {
read("null");
in.next();
if (sp != null) {
Span s = sp.currentSpan();
expectNoFacet(OffsetSpan.class, s);
}
}
use of com.amazon.ion.Span in project ion-java by amzn.
the class NonTextSpanTest method noTextSpanFacet.
@Test
public void noTextSpanFacet() {
read("null");
in.next();
if (sp != null) {
Span s = sp.currentSpan();
expectNoFacet(TextSpan.class, s);
}
}
use of com.amazon.ion.Span in project ion-java by amzn.
the class ReaderFacetTestCase method checkCurrentSpan.
protected void checkCurrentSpan(long start, long finish) {
Span span = sp.currentSpan();
OffsetSpan offsets = assumeFacet(OffsetSpan.class, span);
checkSpan(start, finish, offsets);
offsets = currentSpan(OffsetSpan.class, in);
checkSpan(start, finish, offsets);
}
Aggregations