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.client.db;
20:
21: import net.sourceforge.squirrel_sql.BaseSQuirreLTestCase;
22: import net.sourceforge.squirrel_sql.fw.id.IIdentifier;
23: import net.sourceforge.squirrel_sql.fw.id.IntegerIdentifier;
24:
25: import com.gargoylesoftware.base.testing.EqualsTester;
26:
27: public class AliasGroupTest extends BaseSQuirreLTestCase {
28:
29: protected void setUp() throws Exception {
30: super .setUp();
31: }
32:
33: protected void tearDown() throws Exception {
34: super .tearDown();
35: }
36:
37: public void testEqualsObject() throws Exception {
38: IIdentifier id1 = new IntegerIdentifier(1);
39: IIdentifier id2 = new IntegerIdentifier(2);
40: String name1 = "NameTest";
41: String name2 = "NameTest2";
42:
43: AliasGroup ag1 = new AliasGroup();
44: ag1.setIdentifier(id1);
45: ag1.setName(name1);
46:
47: AliasGroup ag2 = new AliasGroup();
48: ag2.setIdentifier(id1);
49: ag2.setName(name1);
50:
51: AliasGroup ag3 = new AliasGroup();
52: ag3.setIdentifier(id2);
53: ag3.setName(name2);
54:
55: AliasGroup ag4 = new AliasGroup() {
56: private static final long serialVersionUID = 1L;
57: };
58: ag4.setIdentifier(id1);
59: ag4.setName(name1);
60:
61: new EqualsTester(ag1, ag2, ag3, ag4);
62:
63: }
64:
65: }
|