Created
April 18, 2012 03:26
-
-
Save jbclements/2410909 to your computer and use it in GitHub Desktop.
shuffled 09
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 org.bukkit.Material; | |
import org.bukkit.World; | |
import org.junit.Test; | |
import static org.junit.Assert.*; | |
public class Testing { | |
TestingWorld thing;{ | |
thing = new TestingWorld(50, 50, 50); | |
thing.setBlockType(5, 5, 5, Material.WATER); | |
} | |
TestingWorld thing2;{ | |
thing2 = new TestingWorld(3, 3, 3); | |
} | |
RectangularPrism thing3;{ | |
thing3 = new RectangularPrism(2, 2, 2, 1, 1, 1); | |
thing3.render(thing2, Material.DIRT); | |
} | |
TestingWorld thing4;{ | |
thing4 = new TestingWorld(3,3,3); | |
} | |
RectangularPrism thing5;{ | |
thing5 = new RectangularPrism(3, 3, 3, 2, 2, 2); | |
thing5.render(thing4, Material.DIRT); | |
thing5.translate(29, -11, -60); | |
thing5.scale(2); | |
} | |
@Test | |
public void tests(){ | |
new RectangularPrism(2, 2, 2, 59, 198, 82); | |
new RectangularPrism(1, 2, 3, 79, 250, 90); | |
new RectangularPrism(8, 9, 7, 80, 50, 100); | |
assertEquals(new RectangularPrism(10, 10, 10, 58, 90, 78), new RectangularPrism(5, 5, 5, 58, 90, 78).scale(2)); | |
assertEquals(new RectangularPrism(3, 4, 5, 79, 49, 10), new RectangularPrism(3, 4, 5, 50, 60, 70).translate(29, -11, -60)); | |
assertEquals(Material.AIR, new TestingWorld(50, 50, 50).getBlockType(5, 10, 45)); | |
assertEquals(Material.WATER, thing.getBlockType(5, 5, 5)); | |
assertEquals(Material.DIRT, thing2.getBlockType(0, 0, 0)); | |
assertEquals(Material.DIRT, thing2.getBlockType(1, 0, 0)); | |
assertEquals(Material.DIRT, thing2.getBlockType(0, 1, 0)); | |
assertEquals(Material.DIRT, thing2.getBlockType(0, 0, 1)); | |
assertEquals(Material.DIRT, thing2.getBlockType(1, 0, 1)); | |
assertEquals(Material.DIRT, thing2.getBlockType(1, 1, 1)); | |
assertEquals(Material.DIRT, thing2.getBlockType(1, 1, 0)); | |
assertEquals(Material.DIRT, thing2.getBlockType(0, 1, 1)); | |
assertEquals(Material.AIR, thing2.getBlockType(2, 0, 0)); | |
assertEquals(Material.AIR, thing2.getBlockType(2, 1, 0)); | |
assertEquals(Material.AIR, thing2.getBlockType(2, 2, 0)); | |
assertEquals(Material.AIR, thing2.getBlockType(2, 0, 1)); | |
assertEquals(Material.AIR, thing2.getBlockType(2, 1, 1)); | |
assertEquals(Material.AIR, thing2.getBlockType(2, 2, 1)); | |
assertEquals(Material.AIR, thing2.getBlockType(2, 0, 2)); | |
assertEquals(Material.AIR, thing2.getBlockType(2, 1, 2)); | |
assertEquals(Material.AIR, thing2.getBlockType(2, 2, 2)); | |
assertEquals(Material.AIR, thing2.getBlockType(0, 2, 0)); | |
assertEquals(Material.AIR, thing2.getBlockType(0, 2, 1)); | |
assertEquals(Material.AIR, thing2.getBlockType(0, 2, 2)); | |
assertEquals(Material.AIR, thing2.getBlockType(1, 2, 0)); | |
assertEquals(Material.AIR, thing2.getBlockType(1, 2, 1)); | |
assertEquals(Material.AIR, thing2.getBlockType(1, 2, 2)); | |
assertEquals(Material.AIR, thing2.getBlockType(0, 0, 2)); | |
assertEquals(Material.AIR, thing2.getBlockType(0, 1, 2)); | |
assertEquals(Material.AIR, thing2.getBlockType(1, 0, 2)); | |
assertEquals(Material.AIR, thing2.getBlockType(1, 1, 2)); | |
assertEquals(Material.DIRT, thing4.getBlockType(0, 0, 0)); | |
assertEquals(Material.DIRT, thing4.getBlockType(1, 0, 0)); | |
assertEquals(Material.DIRT, thing4.getBlockType(0, 1, 0)); | |
assertEquals(Material.DIRT, thing4.getBlockType(0, 0, 1)); | |
assertEquals(Material.DIRT, thing4.getBlockType(1, 0, 1)); | |
assertEquals(Material.DIRT, thing4.getBlockType(1, 1, 1)); | |
assertEquals(Material.DIRT, thing4.getBlockType(1, 1, 0)); | |
assertEquals(Material.DIRT, thing4.getBlockType(0, 1, 1)); | |
assertEquals(Material.DIRT, thing4.getBlockType(2, 0, 0)); | |
assertEquals(Material.DIRT, thing4.getBlockType(2, 1, 0)); | |
assertEquals(Material.DIRT, thing4.getBlockType(2, 2, 0)); | |
assertEquals(Material.DIRT, thing4.getBlockType(2, 0, 1)); | |
assertEquals(Material.DIRT, thing4.getBlockType(2, 1, 1)); | |
assertEquals(Material.DIRT, thing4.getBlockType(2, 2, 1)); | |
assertEquals(Material.DIRT, thing4.getBlockType(2, 0, 2)); | |
assertEquals(Material.DIRT, thing4.getBlockType(2, 1, 2)); | |
assertEquals(Material.DIRT, thing4.getBlockType(2, 2, 2)); | |
assertEquals(Material.DIRT, thing4.getBlockType(0, 2, 0)); | |
assertEquals(Material.DIRT, thing4.getBlockType(0, 2, 1)); | |
assertEquals(Material.DIRT, thing4.getBlockType(0, 2, 2)); | |
assertEquals(Material.DIRT, thing4.getBlockType(1, 2, 0)); | |
assertEquals(Material.DIRT, thing4.getBlockType(1, 2, 1)); | |
assertEquals(Material.DIRT, thing4.getBlockType(1, 2, 2)); | |
assertEquals(Material.DIRT, thing4.getBlockType(0, 0, 2)); | |
assertEquals(Material.DIRT, thing4.getBlockType(0, 1, 2)); | |
assertEquals(Material.DIRT, thing4.getBlockType(1, 0, 2)); | |
assertEquals(Material.DIRT, thing4.getBlockType(1, 1, 2)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment