Skip to content

Instantly share code, notes, and snippets.

@jbclements
Created April 18, 2012 03:54
Show Gist options
  • Save jbclements/2411008 to your computer and use it in GitHub Desktop.
Save jbclements/2411008 to your computer and use it in GitHub Desktop.
shuffled 17
package edu.calpoly.cpe102sp12;
import static org.junit.Assert.*;
import org.junit.Test;
import org.bukkit.Material;
public class Testing {
@Test
public void test() {
RectangularPrism test1=new RectangularPrism(1,1,1,0,0,0);
assertEquals(new RectangularPrism(5,5,5,0,0,0),test1.scale(5));
assertEquals(new RectangularPrism(1,1,1,1,1,1),test1.translate(1, 1, 1));
SimpleWorld expected = new TestingWorld(1,1,1);
expected.setBlockType(0,0,0, Material.DIRT);
SimpleWorld rendered= new TestingWorld(1,1,1);
test1.render(rendered,Material.DIRT);
assertEquals(expected,rendered);
SimpleWorld expected2 = new TestingWorld(1,1,1);
expected2.setBlockType(0,0,0, Material.STONE);
SimpleWorld rendered2= new TestingWorld(1,1,1);
test1.render(rendered2,Material.STONE);
assertEquals(expected2,rendered2);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment