mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-05 08:40:08 +00:00
Fixes issue #70
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
package org.apollo.game.model;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* Tests the {@link Position} class.
|
||||
*
|
||||
* @author Ryley
|
||||
*/
|
||||
public final class TestPosition {
|
||||
|
||||
/**
|
||||
* Tests the {@link Position#getHeight()} method.
|
||||
*/
|
||||
@Test
|
||||
public void testGetHeight() {
|
||||
Position position = new Position(3222, 3222, 3);
|
||||
Assert.assertEquals(3, position.getHeight());
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests the creation of an invalid {@link Position}.
|
||||
*/
|
||||
@Test(expected = IndexOutOfBoundsException.class)
|
||||
public void testCreateNegativePosition() {
|
||||
new Position(3222, 3222, -1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests the creation of an invalid {@link Position}.
|
||||
*/
|
||||
@Test(expected = IndexOutOfBoundsException.class)
|
||||
public void testCreateOutOfBoundsPosition() {
|
||||
new Position(3222, 3222, 4);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user