KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > xml > wsdl > validator > ValidatorSchemaFactoryRegistryTest


1 /*
2  * ValidatorSchemaFactoryRegistryTest.java
3  * JUnit based test
4  *
5  * Created on February 6, 2007, 11:13 PM
6  */

7
8 package org.netbeans.modules.xml.wsdl.validator;
9
10 import java.util.ArrayList JavaDoc;
11 import junit.framework.*;
12 import java.util.Collection JavaDoc;
13 import java.util.Hashtable JavaDoc;
14 import org.netbeans.modules.xml.wsdl.validator.spi.ValidatorSchemaFactory;
15 import org.openide.util.Lookup;
16
17 /**
18  *
19  * @author radval
20  */

21 public class ValidatorSchemaFactoryRegistryTest extends TestCase {
22     
23     public ValidatorSchemaFactoryRegistryTest(String JavaDoc testName) {
24         super(testName);
25     }
26
27     protected void setUp() throws Exception JavaDoc {
28     }
29
30     protected void tearDown() throws Exception JavaDoc {
31     }
32
33     /**
34      * Test of getDefault method, of class org.netbeans.modules.xml.wsdl.validator.ValidatorSchemaFactoryRegistry.
35      */

36     public void testGetDefault() {
37         System.out.println("getDefault");
38         
39         ValidatorSchemaFactoryRegistry result = ValidatorSchemaFactoryRegistry.getDefault();
40         assertNotNull(result);
41         
42         
43         
44     }
45
46     /**
47      * Test of getValidatorSchemaFactory method, of class org.netbeans.modules.xml.wsdl.validator.ValidatorSchemaFactoryRegistry.
48      */

49     public void testGetValidatorSchemaFactory() {
50         System.out.println("getValidatorSchemaFactory");
51         
52         String JavaDoc namespace = "";
53         ValidatorSchemaFactoryRegistry instance = ValidatorSchemaFactoryRegistry.getDefault();
54         
55         ValidatorSchemaFactory expResult = null;
56         ValidatorSchemaFactory result = instance.getValidatorSchemaFactory(namespace);
57         assertEquals(expResult, result);
58         
59         
60         
61     }
62
63     /**
64      * Test of getAllValidatorSchemaFactories method, of class org.netbeans.modules.xml.wsdl.validator.ValidatorSchemaFactoryRegistry.
65      */

66     public void testGetAllValidatorSchemaFactories() {
67         System.out.println("getAllValidatorSchemaFactories");
68         
69         ValidatorSchemaFactoryRegistry instance = ValidatorSchemaFactoryRegistry.getDefault();
70         
71         Collection JavaDoc<ValidatorSchemaFactory> expResult = new ArrayList JavaDoc<ValidatorSchemaFactory>();
72         Collection JavaDoc<ValidatorSchemaFactory> result = instance.getAllValidatorSchemaFactories();
73         assertEquals(expResult.size(), result.size());
74         
75        
76         
77     }
78     
79 }
80
Popular Tags