public static final CreateProcedureCommand sample1() { return new CreateProcedureCommand(TestBlock.sample1()); }
public static final CreateProcedureCommand sample3() { return new CreateProcedureCommand(TestBlock.sample1()); }
public static final LoopStatement sample1() { Block block = TestBlock.sample1(); return new LoopStatement(block, query1(), "cursor"); //$NON-NLS-1$ }
public static final WhileStatement sample1() { Block block = TestBlock.sample1(); Criteria criteria = TestSetCriteria.sample1(); return new WhileStatement(criteria, block); }
@Test public void testSelfEquivalence(){ Block b1 = sample1(); int equals = 0; UnitTestUtil.helpTestEquivalence(equals, b1, b1); }
@Test public void testGetStatements1() { Block b1 = sample1(); List<Statement> stmts = b1.getStatements(); assertTrue("Incorrect number of statements in the Block", (stmts.size() == 4)); //$NON-NLS-1$ }
@Test public void testGetStatements2() { Block b1 = sample1(); Statement stmt = b1.getStatements().get(1); assertTrue("Incorrect statement in the Block", stmt.equals(TestCommandStatement.sample1())); //$NON-NLS-1$ }
@Test public void testNonEquivalence(){ Block b1 = sample1(); Block b2 = sample2(); int equals = -1; UnitTestUtil.helpTestEquivalence(equals, b1, b2); }
public static final IfStatement sample2() { Block ifBlock = TestBlock.sample2(); Block elseBlock = TestBlock.sample1(); Criteria criteria = TestSetCriteria.sample2(); return new IfStatement(criteria, ifBlock, elseBlock); }
public static final IfStatement sample1() { Block ifBlock = TestBlock.sample1(); Block elseBlock = TestBlock.sample2(); Criteria criteria = TestSetCriteria.sample1(); return new IfStatement(criteria, ifBlock, elseBlock); }
@Test public void testClone() { Block b1 = sample1(); Block b2 = b1.clone(); UnitTestUtil.helpTestEquivalence(0, b1, b2); assertNotSame(b1.getStatements().get(0), b2.getStatements().get(0)); }
public void testGetIfBlock() { IfStatement b1 = sample1(); assertTrue("Incorrect IfBlock on statement", b1.getIfBlock().equals(TestBlock.sample1())); //$NON-NLS-1$ }
public void testCloneNonSimpleQuery(){ Block block = TestBlock.sample1(); LoopStatement ls = new LoopStatement(block, TestSetQuery.sample1(), "cursor"); //$NON-NLS-1$ LoopStatement clone = (LoopStatement) ls.clone(); UnitTestUtil.helpTestEquivalence(0, ls, clone); }
public void testGetBlock() { LoopStatement b1 = sample1(); assertTrue("Incorrect Block on statement", b1.getBlock().equals(TestBlock.sample1())); //$NON-NLS-1$ }
@Test public void testaddStatement1() { Block b1 = sample1().clone(); b1.addStatement(TestCommandStatement.sample2()); assertTrue("Incorrect number of statements in the Block", (b1.getStatements().size() == 5)); //$NON-NLS-1$ }
public void testGetIfBlock() { WhileStatement b1 = sample1(); assertTrue("Incorrect Block on statement", b1.getBlock().equals(TestBlock.sample1())); //$NON-NLS-1$ }
@Test public void testGetBlock() { CreateProcedureCommand b1 = sample1(); assertTrue("Incorrect Block on command", b1.getBlock().equals(TestBlock.sample1())); //$NON-NLS-1$ }
@Test public void testExceptionGroup() { Block b1 = sample1(); Block b2 = b1.clone(); b1.setExceptionGroup("x"); b2.setExceptionGroup("y"); assertFalse(b1.equals(b2)); }