1 /*
2 * Copyright 2006 The Apache Software Foundation.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package org.apache.commons.scxml.env.servlet;
17
18 import junit.framework.Test;
19 import junit.framework.TestCase;
20 import junit.framework.TestSuite;
21
22 public class ServletContextResolverTest extends TestCase {
23
24 public ServletContextResolverTest(String testName) {
25 super(testName);
26 }
27
28 public static Test suite() {
29 return new TestSuite(ServletContextResolverTest.class);
30 }
31
32 public static void main(String args[]) {
33 String[] testCaseName = {ServletContextResolverTest.class.getName()};
34 junit.textui.TestRunner.main(testCaseName);
35 }
36
37 public void testIllegalInstance() {
38 try {
39 new ServletContextResolver(null);
40 fail("ServletContextResolver successfully instantiated with"
41 + " null ServletContext");
42 } catch (IllegalArgumentException iae) {
43 // expected, ignore
44 }
45 }
46
47 }