Search in sources :

Example 1 with RegionMarker

use of jodd.decora.parser.PageRegionExtractor.RegionMarker in project jodd by oblac.

the class PageRegionExtractorTest method testEndRegionMarkersNotEmpty.

@Test(expected = DecoraException.class)
public final void testEndRegionMarkersNotEmpty() {
    // setup
    regionMarkers.add(new RegionMarker("TEST"));
    setInternalState(pageRegionExtractor, "regionMarkers", regionMarkers);
    // when
    pageRegionExtractor.end();
    // then
    fail("A DecorationException must have occured because regionMarkers is not empty.");
}
Also used : RegionMarker(jodd.decora.parser.PageRegionExtractor.RegionMarker) Test(org.junit.Test)

Example 2 with RegionMarker

use of jodd.decora.parser.PageRegionExtractor.RegionMarker in project jodd by oblac.

the class PageRegionExtractorTest method testTag.

@Test(expected = DecoraException.class)
public final void testTag() {
    // setup
    Tag tag = mock(Tag.class);
    when(tag.getType()).thenReturn(TagType.END);
    regionMarkers.add(new RegionMarker("TEST"));
    setInternalState(pageRegionExtractor, "regionMarkers", regionMarkers);
    // when
    pageRegionExtractor.tag(tag);
    // then
    fail("A DecoraException must have occured because tag parameter not matches with any decoraTags.");
}
Also used : Tag(jodd.lagarto.Tag) RegionMarker(jodd.decora.parser.PageRegionExtractor.RegionMarker) Test(org.junit.Test)

Aggregations

RegionMarker (jodd.decora.parser.PageRegionExtractor.RegionMarker)2 Test (org.junit.Test)2 Tag (jodd.lagarto.Tag)1