01: /*
02: * Copyright 2001-2007 Geert Bevin <gbevin[remove] at uwyn dot com>
03: * Distributed under the terms of either:
04: * - the common development and distribution license (CDDL), v1.0; or
05: * - the GNU Lesser General Public License, v2.1 or later
06: * $Id: TestDropSequenceMysql.java 3634 2007-01-08 21:42:24Z gbevin $
07: */
08: package com.uwyn.rife.database.queries;
09:
10: import com.uwyn.rife.database.exceptions.SequenceNameRequiredException;
11: import com.uwyn.rife.database.exceptions.UnsupportedSqlFeatureException;
12:
13: public class TestDropSequenceMysql extends TestDropSequence {
14: public TestDropSequenceMysql(String name) {
15: super (name);
16: }
17:
18: public void testInstantiationMysql() {
19: DropSequence query = new DropSequence(mMysql);
20: assertNotNull(query);
21: try {
22: query.getSql();
23: fail();
24: } catch (SequenceNameRequiredException e) {
25: assertEquals(e.getQueryName(), "DropSequence");
26: }
27: }
28:
29: public void testClearMysql() {
30: DropSequence query = new DropSequence(mMysql);
31: query.name("sequencename");
32: try {
33: query.getSql();
34: fail();
35: } catch (UnsupportedSqlFeatureException e) {
36: assertTrue(true);
37: }
38: }
39:
40: public void testCreateMysql() {
41: DropSequence query = new DropSequence(mMysql);
42: query.name("sequencename");
43: try {
44: query.getSql();
45: fail();
46: } catch (UnsupportedSqlFeatureException e) {
47: assertTrue(true);
48: }
49: }
50:
51: public void testCloneMysql() {
52: // sequences are not supported on mysql
53: }
54: }
|