Package org.jitterbit.integration.database

Examples of org.jitterbit.integration.database.BeginEndQuote


        assertEquals("Artists", quotes.getSimpleName(table));
    }
   
    @Test
    public void testEscapeName() {
        testEscapeNameImpl(new BeginEndQuote(""));
        testEscapeNameImpl(new BeginEndQuote("\""));
        testEscapeNameImpl(new BeginEndQuote("[", "]"));
    }
View Full Code Here


        assertEquals(escaped, quotes.escapeNameIfNeeded(name));
    }
   
    @Test
    public void testUnescapeName() {
        testUnescapeNameImpl(new BeginEndQuote(""));
        testUnescapeNameImpl(new BeginEndQuote("\""));
        testUnescapeNameImpl(new BeginEndQuote("[", "]"));
    }
View Full Code Here

        assertEquals(name, quotes.unescapeName(escaped));
    }

    @Test
    public void testIsEnclosingName() {
        testIsEnclosingNameImpl(new BeginEndQuote(""));
        testIsEnclosingNameImpl(new BeginEndQuote("\""));
        testIsEnclosingNameImpl(new BeginEndQuote("[", "]"));
    }
View Full Code Here

        assertTrue(name.equals(enclosed) || quotes.isEnclosingName(enclosed));
    }
   
    @Test
    public void testGetQualifiedNameImpl() {
        BeginEndQuote q = new BeginEndQuote("\"");
        DatabaseTable table = new DatabaseTable("orders", "public");
        assertEquals("\"public\".\"orders\"", q.getQualifiedName(table));
        table = new DatabaseTable("\"orders\"", "\"public\"");
        assertEquals("\"public\".\"orders\"", q.getQualifiedName(table));
    }
View Full Code Here

        assertEquals("\"public\".\"orders\"", q.getQualifiedName(table));
    }
   
    @Test
    public void testEquals() {
        BeginEndQuote q1 = new BeginEndQuote("[", "]");
        assertFalse(q1.equals("hej"));
        assertEquals(q1, q1);
        BeginEndQuote q2 = new BeginEndQuote("\"");
        assertFalse(q1.equals(q2));
        BeginEndQuote q3 = new BeginEndQuote("[", "]");
        assertEquals(q1, q3);
    }
View Full Code Here

    }
   
    @Test
    public void testFromString() {
        assertNull(BeginEndQuote.fromStrings(null, null));
        BeginEndQuote q = BeginEndQuote.fromStrings("", "");
        assertEquals(new BeginEndQuote(""), q);
        q = BeginEndQuote.fromStrings("\"", "\"");
        assertEquals(new BeginEndQuote("\""), q);
        q = BeginEndQuote.fromStrings("[", "]");
        assertEquals(new BeginEndQuote("[", "]"), q);
    }
View Full Code Here

    @Override
    public int hashCode() {
        int hash = 17;
        hash = 31 * hash + getName().hashCode();
        hash = 31 * hash + getType().hashCode();
        BeginEndQuote quotes = getBeginEndQuotes();
        hash = 31 * hash + (quotes != null ? quotes.hashCode() : 0);
        hash = 31 * hash + driverClass.hashCode();
        hash = 31 * hash + subprotocol.hashCode();
        return hash;
    }
View Full Code Here

*/
public final class InformixUtilsJUnitTest {

    @Test
    public void ensureIsInformixDriverWorks() {
        BeginEndQuote quotes = BeginEndQuote.fromStrings("'", "'");
        DriverDescriptor driver = new OdbcDriverDescriptor("Informix", quotes);
        assertTrue(isInformix(driver));
        driver = new OdbcDriverDescriptor("PostgreSQL", quotes);
        assertFalse(isInformix(driver));
        driver = new JdbcDriverDescriptor("Informix", "informix", "a.b.c", quotes);
View Full Code Here

            }
        }
    }

    private void defineBeginAndEndQuote(CROM root) {
        BeginEndQuote quotes = DbUtils.extractBeginAndEndQuoteFromJTR(root);
        beginQuote = quotes.begin;
        endQuote = quotes.end;
    }
View Full Code Here

    }

    public TestConnectionResult testConnection() {
        Connection conn = null;
        boolean connected = false;
        BeginEndQuote quotes = null;
        Exception connectionError = null;
        try {
            conn = connectionFactory.newConnection();
            connected = true;
            try {
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.database.BeginEndQuote

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.