KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sleepycat > je > ApiTest


1 /*-
2  * See the file LICENSE for redistribution information.
3  *
4  * Copyright (c) 2002,2006 Oracle. All rights reserved.
5  *
6  * $Id: ApiTest.java,v 1.15 2006/10/30 21:14:40 bostic Exp $
7  */

8
9 package com.sleepycat.je;
10
11 import junit.framework.TestCase;
12
13
14 /**
15  * Test parameter handling for api methods.
16  */

17 public class ApiTest extends TestCase {
18     
19     public void testBasic()
20         throws Exception JavaDoc {
21
22         try {
23             new Environment(null, null);
24             fail("Should get exception");
25         } catch (NullPointerException JavaDoc e) {
26             // expected exception
27
} catch (Exception JavaDoc e) {
28             fail("Shouldn't get other exception");
29         }
30
31     }
32 }
33
Popular Tags