Created
April 18, 2012 03:53
-
-
Save jbclements/2411005 to your computer and use it in GitHub Desktop.
shuffled 16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package edu.calpoly.cpe102sp12; | |
import static org.junit.Assert.*; | |
import org.junit.Test; | |
import org.bukkit.Material; | |
import java.util.Arrays; | |
public class Testing | |
{ | |
RectangularPrism cube1 = new RectangularPrism(5,5,5,5,5,5); | |
RectangularPrism cube2 = new RectangularPrism(7,7,7,7,7,7); | |
RectangularPrism cube3 = new RectangularPrism(10,10,10,5,5,5); | |
RectangularPrism cube4 = new RectangularPrism(7,7,7,9,10,11); | |
int x, y, z; | |
TestingWorld tWorld = new TestingWorld(30,30,30); | |
@Test | |
public void test() | |
{ | |
for(int i=10; i<20; i++) | |
{ | |
for(int j=10; j<20; j++) | |
{ | |
for(int k=10; k<20; k++) | |
{ | |
tWorld.setBlockType(i,j,k,Material.DIRT); | |
} | |
} | |
} | |
assertEquals(cube3, cube1.scale(2.0)); | |
assertEquals(cube3.xLoc, cube1.scale(2.0).xLoc); | |
assertEquals(cube4, cube2.translate(2,3,4)); | |
assertEquals(Material.AIR, tWorld.getBlockType(2,2,2)); | |
assertEquals(tWorld.getBlockType(1,1,1), tWorld.getBlockType(2,2,2)); | |
assertEquals(Material.DIRT, tWorld.getBlockType(15,15,15)); | |
cube1.render(tWorld, Material.WATER); | |
assertEquals(Material.WATER, tWorld.getBlockType(5,5,5)); | |
assertEquals(Material.WATER, tWorld.getBlockType(6,6,3)); | |
assertEquals(Material.WATER, tWorld.getBlockType(2,6,3)); | |
assertEquals(Material.AIR, tWorld.getBlockType(1,6,3)); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment