01: /**
02: *
03: * Copyright 2004 The Apache Software Foundation
04: *
05: * Licensed under the Apache License, Version 2.0 (the "License");
06: * you may not use this file except in compliance with the License.
07: * You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */package org.apache.ws.scout.registry;
17:
18: import static org.junit.Assert.assertEquals;
19: import static org.junit.Assert.assertNotNull;
20:
21: import javax.xml.registry.CapabilityProfile;
22: import javax.xml.registry.JAXRException;
23: import javax.xml.registry.RegistryService;
24: import javax.xml.registry.UnsupportedCapabilityException;
25:
26: import junit.framework.JUnit4TestAdapter;
27:
28: import org.junit.Before;
29: import org.junit.Test;
30:
31: /**
32: * @version $Revision$ $Date$
33: */
34: public class RegistryServiceTest {
35: private RegistryService registry;
36:
37: @Before
38: public void setUp() throws Exception {
39: registry = new RegistryServiceImpl(null, null, -1);
40: }
41:
42: @Test
43: public void testCapabilityProfile() throws JAXRException {
44: CapabilityProfile profile = registry.getCapabilityProfile();
45: assertNotNull(profile);
46: assertEquals(0, profile.getCapabilityLevel());
47: }
48:
49: @Test
50: public void testDeclarativeQueryManager() throws JAXRException {
51: try {
52: registry.getDeclarativeQueryManager();
53: } catch (UnsupportedCapabilityException e) {
54: // ok
55: }
56: }
57:
58: public static junit.framework.Test suite() {
59: return new JUnit4TestAdapter(RegistryServiceTest.class);
60: }
61:
62: }
|