View Javadoc

1   /*
2   Wotonomy: OpenStep design patterns for pure Java applications.
3   Copyright (C) 2005 Israfil Consulting Services Corporation
4   Copyright (C) 2005 Christian Edward Gruber
5   
6   This library is free software; you can redistribute it and/or
7   modify it under the terms of the GNU Lesser General Public
8   License as published by the Free Software Foundation; either
9   version 2.1 of the License, or (at your option) any later version.
10  
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  Lesser General Public License for more details.
15  
16  You should have received a copy of the GNU Lesser General Public
17  License along with this library; if not, see http://www.gnu.org
18  */
19  package net.wotonomy.foundation;
20  
21  import java.io.File;
22  import java.net.URL;
23  import java.util.Properties;
24  
25  import junit.framework.Assert;
26  import junit.framework.TestCase;
27  
28  public class NSBundleTest extends TestCase {
29  
30  	public NSBundleTest(String arg0) {
31  		super(arg0);
32  	}
33  	
34  	protected void setUp() throws Exception {
35  		super.setUp();
36  	}
37  
38  	protected void tearDown() throws Exception {
39  		super.tearDown();
40  	}
41  	/*
42  	public void testNSBundle() {
43  		//TODO Implement NSBundle().
44  		fail("Test not implemented.");
45  	}
46  
47  	public void testBundleForClass() {
48  		//TODO Implement bundleForClass().
49  		fail("Test not implemented.");
50  	}
51  	*/
52  
53  	public void testBundleWithURL() throws Exception{
54  		/*
55  		URL url = new File(System.getProperty("user.dir")+"/target/test-classes/TestBundle.framework").toURI().toURL();
56  		System.out.println(url.toString());
57  		NSBundle bundle = NSBundle.bundleWithURL(url);
58  		Assert.assertNotNull(bundle);
59  		Assert.assertEquals("TestBundle",bundle.name());
60  		Assert.assertEquals(true,bundle.isFramework());
61  		Properties p = bundle.properties();
62  		Assert.assertNotNull(p);
63  		Assert.assertEquals("TestValue",p.getProperty("TestKey"));
64  		*/
65  	}
66  	/*
67  	public void testBundleForName() {
68  		//TODO Implement bundleForName().
69  		fail("Test not implemented.");
70  	}
71  
72  	public void testFrameworkBundles() {
73  		//TODO Implement frameworkBundles().
74  		fail("Test not implemented.");
75  	}
76  
77  	public void testSetMainBundle() {
78  		//TODO Implement setMainBundle().
79  		fail("Test not implemented.");
80  	}
81  
82  	public void testMainBundle() {
83  		//TODO Implement mainBundle().
84  		fail("Test not implemented.");
85  	}
86  
87  	public void testDefaultLocalePrefix() {
88  		//TODO Implement defaultLocalePrefix().
89  		fail("Test not implemented.");
90  	}
91  
92  	public void testFindOrCreateBundleWithPath() {
93  		//TODO Implement findOrCreateBundleWithPath().
94  		fail("Test not implemented.");
95  	}
96  
97  	public void testBundleClassPackageNames() {
98  		//TODO Implement bundleClassPackageNames().
99  		fail("Test not implemented.");
100 	}
101 
102 	public void testBundlePath() {
103 		//TODO Implement bundlePath().
104 		fail("Test not implemented.");
105 	}
106 
107 	public void testBytesForResourcePath() {
108 		//TODO Implement bytesForResourcePath().
109 		fail("Test not implemented.");
110 	}
111 
112 	public void testBundleClassNames() {
113 		//TODO Implement bundleClassNames().
114 		fail("Test not implemented.");
115 	}
116 
117 	public void testInfoDictionary() {
118 		//TODO Implement infoDictionary().
119 		fail("Test not implemented.");
120 	}
121 
122 	public void testInputStreamForResourcePath() {
123 		//TODO Implement inputStreamForResourcePath().
124 		fail("Test not implemented.");
125 	}
126 
127 	public void testIsFramework() {
128 		//TODO Implement isFramework().
129 		fail("Test not implemented.");
130 	}
131 
132 	public void testLoad() {
133 		//TODO Implement load().
134 		fail("Test not implemented.");
135 	}
136 
137 	public void testName() {
138 		//TODO Implement name().
139 		fail("Test not implemented.");
140 	}
141 
142 	public void testPrincipalClass() {
143 		//TODO Implement principalClass().
144 		fail("Test not implemented.");
145 	}
146 
147 	public void testProperties() {
148 		//TODO Implement properties().
149 		fail("Test not implemented.");
150 	}
151 
152 	public void testResourcePathForLocalizedResourceNamed() {
153 		//TODO Implement resourcePathForLocalizedResourceNamed().
154 		fail("Test not implemented.");
155 	}
156 
157 	public void testResourcePathsForDirectories() {
158 		//TODO Implement resourcePathsForDirectories().
159 		fail("Test not implemented.");
160 	}
161 
162 	public void testResourcePathsForLocalizedResources() {
163 		//TODO Implement resourcePathsForLocalizedResources().
164 		fail("Test not implemented.");
165 	}
166 
167 	public void testResourcePathsForResources() {
168 		//TODO Implement resourcePathsForResources().
169 		fail("Test not implemented.");
170 	}	
171 
172 	public void testToString() {
173 		//TODO Implement toString().
174 		fail("Test not implemented.");
175 	}
176 	
177 	*/
178 
179 }