 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.utils;
22 import org.junit.Assert;
23 import org.junit.Test;
37 Assert.assertEquals(
"width MUST be stored", 100, size.
getWidth());
38 Assert.assertEquals(
"height MUST be stored", 200, size.
getHeight());
52 Assert.assertEquals(
"Sizes with identical width and height MUST be equal.", size1, size2);
53 Assert.assertEquals(
"Sizes with identical width and height MUST be equal.", size1, size3);
54 Assert.assertEquals(
"Sizes with identical width and height MUST be equal.", size2, size1);
55 Assert.assertEquals(
"Sizes with identical width and height MUST be equal.", size2, size3);
56 Assert.assertEquals(
"Sizes with identical width and height MUST be equal.", size3, size1);
57 Assert.assertEquals(
"Sizes with identical width and height MUST be equal.", size3, size2);
58 Assert.assertNotEquals(
"Sizes with different width or height MUST be unequal", size1, differBoth);
59 Assert.assertNotEquals(
"Sizes with different width or height MUST be unequal", size1, differWidth);
60 Assert.assertNotEquals(
"Sizes with different width or height MUST be unequal", size1, differHeight);
70 Assert.assertEquals(
"Equal sizes MUST return the same hashCode.", size1.
hashCode(), size2.
hashCode());
79 Assert.assertEquals(
"width MUST be stored", 100, size.
getWidth());
88 Assert.assertEquals(
"height MUST be stored", 200, size.
getHeight());
int getWidth()
Returns the width of the area.
int getHeight()
Returns the height of the area.
void testGetWidth()
Test case for Size2D#getWidth().
void testGetHeight()
Test case for Size2D#getHeight().
void testEquals()
Test case for Size2D#equals(Object).
void testSize2D()
Test case for Size2D#Size2D(int, int).
The class Size2D represents a 2d rectangular area.
void testHashCode()
Test case for Size2D#hashCode().