KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > config > schema > NewSystemConfigObjectTest


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.config.schema;
5
6 import org.apache.xmlbeans.XmlObject;
7
8 import com.terracottatech.config.System;
9 import com.terracottatech.config.TcConfigDocument.TcConfig;
10
11 /**
12  * Unit/subsystem test for {@link NewSystemConfigObject}.
13  */

14 public class NewSystemConfigObjectTest extends ConfigObjectTestBase {
15
16   public void setUp() throws Exception JavaDoc {
17     super.setUp(System JavaDoc.class);
18   }
19
20   protected XmlObject getBeanFromTcConfig(TcConfig config) throws Exception JavaDoc {
21     return config.getSystem();
22   }
23
24   public void testConstruction() throws Exception JavaDoc {
25     try {
26       new NewSystemConfigObject(null);
27       fail("Didn't get NPE on no context");
28     } catch (NullPointerException JavaDoc npe) {
29       // ok
30
}
31   }
32 }
33
Popular Tags