Skip to content

Instantly share code, notes, and snippets.

@jbclements
Created April 18, 2012 03:21
Show Gist options
  • Save jbclements/2410886 to your computer and use it in GitHub Desktop.
Save jbclements/2410886 to your computer and use it in GitHub Desktop.
shuffled 03
package edu.calpoly.cpe102sp12;
import static org.junit.Assert.*;
import org.bukkit.Material;
import org.junit.Test;
public class Testing
{
@Test
public void test()
{
RectangularPrism rect1 = new RectangularPrism(3, 4, 5, 2, 2, 2);
assertEquals(new RectangularPrism(6, 8, 10, 2, 2, 2), rect1.scale(2));
assertEquals(new RectangularPrism(3, 4, 5, 3, 4, 5),
rect1.translate(1, 2, 3));
assertEquals(new RectangularPrism(2, 2, 3, 2, 2, 2), rect1.scale(0.5));
assertEquals(new RectangularPrism(3, 4, 5, 3, 4, 5),
rect1.translate(1, 2, 3));
assertEquals(new RectangularPrism(3, 4, 5, 2, 2, 2), rect1);
assertEquals(false, new RectangularPrism(0, 2, 1, 8, 1, 3) == rect1);
TestingWorld tW = new TestingWorld(10, 10, 10);
assertEquals(new TestingWorld(10, 10, 10), tW);
assertEquals(Material.AIR, tW.getBlockType(0, 0, 0));
tW.setBlockType(5, 5, 5, Material.APPLE);
assertEquals(Material.APPLE, tW.getBlockType(5, 5, 5));
tW.setBlockType(0, 0, 0, Material.AIR);
tW = new TestingWorld(1,1,1);
new RectangularPrism(1, 1, 1, 0, 0, 0).render(tW, Material.AIR);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment