org.apache.ojb.broker
Class ExtentAwarePathExpressionsTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.apache.ojb.broker.ExtentAwarePathExpressionsTest
All Implemented Interfaces:
junit.framework.Test

public class ExtentAwarePathExpressionsTest
extends junit.framework.TestCase

Tests for extent aware path expressions

Author:
Leandro Rodrigo Saad Cruz $Id: ExtentAwarePathExpressionsTest.java,v 1.6 2003/07/10 22:05:18 baserose Exp $

Constructor Summary
ExtentAwarePathExpressionsTest()
           
ExtentAwarePathExpressionsTest(java.lang.String testName)
           
 
Method Summary
static void main(java.lang.String[] args)
          You can run the test like a java app
 void setUp()
           
static junit.framework.Test suite()
           
 void tearDown()
           
 void testAddPathClass()
           
 void testAddPathClasses()
          The order of criteria elements influences the use of parenthesis, If we add the Like element before the NotNull one we get the wrong query Right clause : WHERE WHERE (A2.NAME IS NOT NULL OR A2E1.NAME IS NOT NULL ) AND A0.HEADLINE LIKE 'Bra% Wrong clause : WHERE (A0.HEADLINE LIKE 'Bra%' ) AND A2.NAME IS NOT NULL OR A2E1.NAME IS NOT NULL
 void testNotNullPathElement()
           
 void testSetPathClass()
           
 void testWithoutHintClass1()
           
 void testWithoutHintClass2()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExtentAwarePathExpressionsTest

public ExtentAwarePathExpressionsTest()

ExtentAwarePathExpressionsTest

public ExtentAwarePathExpressionsTest(java.lang.String testName)
Method Detail

main

public static void main(java.lang.String[] args)
You can run the test like a java app


suite

public static junit.framework.Test suite()

setUp

public void setUp()
           throws PBFactoryException
Throws:
PBFactoryException

tearDown

public void tearDown()

testWithoutHintClass1

public void testWithoutHintClass1()
                           throws java.lang.Exception
Throws:
java.lang.Exception

testWithoutHintClass2

public void testWithoutHintClass2()
                           throws java.lang.Exception
Throws:
java.lang.Exception

testNotNullPathElement

public void testNotNullPathElement()

testSetPathClass

public void testSetPathClass()

testAddPathClass

public void testAddPathClass()

testAddPathClasses

public void testAddPathClasses()
The order of criteria elements influences the use of parenthesis, If we add the Like element before the NotNull one we get the wrong query Right clause : WHERE WHERE (A2.NAME IS NOT NULL OR A2E1.NAME IS NOT NULL ) AND A0.HEADLINE LIKE 'Bra% Wrong clause : WHERE (A0.HEADLINE LIKE 'Bra%' ) AND A2.NAME IS NOT NULL OR A2E1.NAME IS NOT NULL



Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14