1 package org.jmage.mapper;
2
3 import junit.framework.TestCase;
4 import org.jmage.ImageRequest;
5 import org.jmage.JmageException;
6
7 import java.net.URI;
8 import java.net.URISyntaxException;
9
10 /***
11 * ImageRequestMapperTests
12 */
13 public class ImageRequestMapperTests extends TestCase {
14
15 public void testRequestMapper() throws URISyntaxException, JmageException {
16 ImageRequestMapper mapper = new ImageRequestMapper();
17 mapper.setImageRequest(this.createRequest());
18 byte[] b = mapper.processRequest();
19 assertNotNull(b);
20 }
21
22 private ImageRequest createRequest() throws URISyntaxException {
23 ImageRequest request = new ImageRequest();
24 request.setImageURI(new URI("file:///sample/june_vase.jpg"));
25 request.setFilterChainURI(new URI("chain:org.jmage.filter.NoOpFilter"));
26 request.setEncodingFormat("jpg");
27 return request;
28 }
29 }