01: /*
02: * Copyright (C) 2007 Rob Manning
03: * manningr@users.sourceforge.net
04: *
05: * This library is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU Lesser General Public
07: * License as published by the Free Software Foundation; either
08: * version 2.1 of the License, or (at your option) any later version.
09: *
10: * This library is distributed in the hope that it will be useful,
11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13: * Lesser General Public License for more details.
14: *
15: * You should have received a copy of the GNU Lesser General Public
16: * License along with this library; if not, write to the Free Software
17: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18: */
19: package net.sourceforge.squirrel_sql.plugins.mssql;
20:
21: import static org.junit.Assert.*;
22:
23: import net.sourceforge.squirrel_sql.plugins.mssql.sql.constraint.MssqlConstraint;
24: import net.sourceforge.squirrel_sql.plugins.mssql.sql.constraint.TableConstraints;
25:
26: import org.junit.After;
27: import org.junit.Before;
28: import org.junit.Ignore;
29: import org.junit.Test;
30:
31: public class TableConstraintsTest {
32:
33: TableConstraints constraintsUnderTest = null;
34:
35: @Before
36: public void setUp() throws Exception {
37: constraintsUnderTest = new TableConstraints();
38: }
39:
40: @After
41: public void tearDown() throws Exception {
42: constraintsUnderTest = null;
43: }
44:
45: @Test
46: public final void testGetConstraints() {
47: MssqlConstraint[] constraints = constraintsUnderTest
48: .getConstraints();
49: assertEquals(0, constraints.length);
50: }
51:
52: @Test
53: public final void testAddConstraint() {
54: constraintsUnderTest.addConstraint(new MssqlConstraint());
55: MssqlConstraint[] constraints = constraintsUnderTest
56: .getConstraints();
57: assertEquals(1, constraints.length);
58: }
59:
60: @Test
61: @Ignore
62: public final void testGetDefaultsForColumn() {
63: fail("Not yet implemented"); // TODO
64: }
65:
66: @Test
67: @Ignore
68: public final void testGetCheckConstraints() {
69: fail("Not yet implemented"); // TODO
70: }
71:
72: @Test
73: @Ignore
74: public final void testGetForeignKeyConstraints() {
75: fail("Not yet implemented"); // TODO
76: }
77:
78: @Test
79: @Ignore
80: public final void testGetPrimaryKeyConstraints() {
81: fail("Not yet implemented"); // TODO
82: }
83:
84: }
|