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.session;
20:
21: import org.junit.After;
22: import org.junit.Before;
23: import org.junit.Test;
24:
25: /**
26: * Test class for MessagePanel
27: *
28: * @author manningr
29: */
30: public class MessagePanelTest {
31:
32: MessagePanel messagePanelUnderTest = null;
33:
34: /**
35: * @throws java.lang.Exception
36: */
37: @Before
38: public void setUp() throws Exception {
39: messagePanelUnderTest = new MessagePanel();
40: }
41:
42: /**
43: * @throws java.lang.Exception
44: */
45: @After
46: public void tearDown() throws Exception {
47: messagePanelUnderTest = null;
48: }
49:
50: /**
51: * Test method for {@link net.sourceforge.squirrel_sql.client.session.MessagePanel#addToMessagePanelPopup(javax.swing.Action)}.
52: */
53: @Test(expected=IllegalArgumentException.class)
54: public final void testAddToMessagePanelPopup() {
55: messagePanelUnderTest.addToMessagePanelPopup(null);
56: }
57:
58: /**
59: * Test method for {@link net.sourceforge.squirrel_sql.client.session.MessagePanel#showMessage(java.lang.Throwable, net.sourceforge.squirrel_sql.fw.util.ExceptionFormatter)}.
60: */
61: @Test(expected=IllegalArgumentException.class)
62: public final void testShowMessageThrowableExceptionFormatter() {
63: messagePanelUnderTest.showMessage(null, null);
64: }
65:
66: /**
67: * Test method for {@link net.sourceforge.squirrel_sql.client.session.MessagePanel#showErrorMessage(java.lang.Throwable, net.sourceforge.squirrel_sql.fw.util.ExceptionFormatter)}.
68: */
69: @Test(expected=IllegalArgumentException.class)
70: public final void testShowErrorMessageThrowableExceptionFormatter() {
71: messagePanelUnderTest.showErrorMessage(null, null);
72: }
73:
74: /**
75: * Test method for {@link net.sourceforge.squirrel_sql.client.session.MessagePanel#showMessage(java.lang.String)}.
76: */
77: @Test(expected=IllegalArgumentException.class)
78: public final void testShowMessageString() {
79: messagePanelUnderTest.showMessage(null);
80: }
81:
82: /**
83: * Test method for {@link net.sourceforge.squirrel_sql.client.session.MessagePanel#showWarningMessage(java.lang.String)}.
84: */
85: @Test(expected=IllegalArgumentException.class)
86: public final void testShowWarningMessage() {
87: messagePanelUnderTest.showWarningMessage(null);
88: }
89:
90: /**
91: * Test method for {@link net.sourceforge.squirrel_sql.client.session.MessagePanel#showErrorMessage(java.lang.String)}.
92: */
93: @Test(expected=IllegalArgumentException.class)
94: public final void testShowErrorMessageString() {
95: messagePanelUnderTest.showErrorMessage(null);
96: }
97:
98: }
|