1 package org.jmage.filter.merge; 2 3 import org.jmage.JmageException; 4 import org.jmage.mapper.JunitMapper; 5 6 import java.io.IOException; 7 import java.net.URI; 8 import java.net.URISyntaxException; 9 import java.util.Properties; 10 11 /*** 12 * Test Textoverlay fails with Empty Text 13 */ 14 public class TextOverlayEmptyText extends JunitMapper { 15 16 public void setFilterChainURI() throws URISyntaxException { 17 request.setFilterChainURI(new URI("chain:org.jmage.filter.merge.TextOverlayFilter")); 18 } 19 20 public void setProperties() { 21 Properties props = new Properties(); 22 props.setProperty("FONT_URI", "file:///maxhandwriting.ttf"); 23 props.setProperty("TEXT", ""); 24 props.setProperty("POSITION", "7"); 25 props.setProperty("COLOR", "0000dd"); 26 props.setProperty("FONT_SIZE", "44"); 27 props.setProperty("FONT_STYLE", "ITALIC"); 28 props.setProperty("ANTIALIASING", "TRUE"); 29 props.setProperty("BORDEROFFSET", "20"); 30 props.setProperty("ORIENTATION", "355"); 31 props.setProperty("OPACITY", "0"); 32 request.setFilterChainProperties(props); 33 } 34 35 public void testFilter() throws JmageException, IOException { 36 boolean failed = false; 37 try { 38 dispatcher.dispatch(request); 39 this.writeResults(request); 40 } catch (Throwable t) { 41 failed = true; 42 } 43 assertTrue(failed); 44 } 45 }