File: ImageNodeTest.java

package info (click to toggle)
piccolo 1.2-1.1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 1,668 kB
  • sloc: java: 16,496; xml: 259; sh: 18; makefile: 13
file content (26 lines) | stat: -rw-r--r-- 731 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import java.awt.image.BufferedImage;

import junit.framework.TestCase;

import edu.umd.cs.piccolo.nodes.PImage;
import edu.umd.cs.piccolo.util.PBounds;

public class ImageNodeTest extends TestCase {

	public ImageNodeTest(String name) {
		super(name);
	}
	
	public void testCopy() {
		PImage aNode = new PImage(new BufferedImage(100, 100, BufferedImage.TYPE_INT_ARGB));
		aNode = (PImage) aNode.clone();
		assertNotNull(aNode.getImage());
		assertEquals(aNode.getBounds(), new PBounds(0, 0, 100, 100));
	}	
	
	public void testToString() {
		PImage aNode = new PImage(new BufferedImage(100, 100, BufferedImage.TYPE_INT_ARGB));
		aNode.getFullBoundsReference();
		System.out.println(aNode.toString());
	}
}