Exemplo n.º 1
0
 @Test
 public void testEquals() {
   final Block block = new Block(program), block2 = new Block(program);
   assertTrue(block.equals(block2));
   assertTrue(block2.equals(block2));
   assertFalse(block.equals(new Block()));
 }
Exemplo n.º 2
0
 @Test
 public void testGenerateCodeString() {
   final Block block = new Block(program);
   assertEquals("{\n  \"docstr\"\n  abc\n  abc.def\n  123\n}", block.generateCodeString());
 }
Exemplo n.º 3
0
 @Test
 public void testConstruct() {
   final Block block = new Block(program);
   assertEquals(program, block.getProgram());
 }