MCPcopy Create free account
hub / github.com/Neop/mudmap2 / testGenerate

Method testGenerate

src/test/java/mudmap2/backend/legend/LegendTest.java:177–201  ·  view source on GitHub ↗

Test of generate method, of class Legend.

()

Source from the content-addressed store, hash-verified

175 * Test of generate method, of class Legend.
176 */
177 @Test
178 public void testGenerate() {
179 System.out.println("generate");
180
181 int imageWidth = 500;
182 int imageHeight = 700;
183
184 Legend instance1 = new Legend(layer, Legend.Orientation.HORIZONTAL, imageWidth);
185 try {
186 BufferedImage result = instance1.generate();
187 assertNotNull(result);
188 assertEquals(imageWidth, result.getWidth());
189 } catch(Legend.RenderException ex){
190 fail(ex.getMessage());
191 }
192
193 Legend instance2 = new Legend(layer, Legend.Orientation.VERTICAL, imageHeight);
194 try {
195 BufferedImage result = instance2.generate();
196 assertNotNull(result);
197 assertEquals(imageHeight, result.getHeight());
198 } catch(Legend.RenderException ex){
199 fail(ex.getMessage());
200 }
201 }
202
203}

Callers

nothing calls this directly

Calls 3

generateMethod · 0.95
getWidthMethod · 0.65
getHeightMethod · 0.65

Tested by

no test coverage detected