1 | /* |
2 | * VerifiersTest.java |
3 | * |
4 | * Created on 18.11.2005. |
5 | * |
6 | * eaio: NativeCall - calling operating system methods from Java |
7 | * Copyright (c) 2004-2006 Johann Burkard (<mailto:jb@eaio.com>) |
8 | * <http://eaio.com> |
9 | * |
10 | * Permission is hereby granted, free of charge, to any person obtaining a |
11 | * copy of this software and associated documentation files (the "Software"), |
12 | * to deal in the Software without restriction, including without limitation |
13 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
14 | * and/or sell copies of the Software, and to permit persons to whom the |
15 | * Software is furnished to do so, subject to the following conditions: |
16 | * |
17 | * The above copyright notice and this permission notice shall be included |
18 | * in all copies or substantial portions of the Software. |
19 | * |
20 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
21 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
22 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN |
23 | * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, |
24 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR |
25 | * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE |
26 | * USE OR OTHER DEALINGS IN THE SOFTWARE. |
27 | * |
28 | */ |
29 | package com.eaio.nativecall; |
30 | |
31 | import junit.framework.TestCase; |
32 | |
33 | /** |
34 | * Test case for the {@link com.eaio.nativecall.Verifiers} class. |
35 | * |
36 | * @author <a href="mailto:jb@eaio.com">Johann Burkard</a> |
37 | * @version $Id: VerifiersTest.java,v 1.2 2006/01/05 19:57:07 grnull Exp $ |
38 | */ |
39 | public class VerifiersTest extends TestCase { |
40 | |
41 | /** |
42 | * Constructor for VerifiersTest. |
43 | * @param arg0 |
44 | */ |
45 | public VerifiersTest(String arg0) { |
46 | super(arg0); |
47 | } |
48 | |
49 | public static void main(String[] args) { |
50 | junit.awtui.TestRunner.run(VerifiersTest.class); |
51 | } |
52 | |
53 | public void testInit() { |
54 | Verifiers.init(); |
55 | } |
56 | |
57 | public void testGetInstance() { |
58 | String osName = System.getProperty("os.name"); |
59 | if (osName.startsWith("Windows")) { |
60 | assertNotNull(Verifiers.getInstance()); |
61 | assertEquals("kernel32", Verifiers.getInstance() |
62 | .getDefaultModule()); |
63 | } |
64 | } |
65 | |
66 | } |