1 50 package org.apache.avalon.meta.info.test; 51 52 import org.apache.avalon.meta.info.Descriptor; 53 import org.apache.avalon.meta.info.ExtensionDescriptor; 54 55 61 public class ExtensionDescriptorTestCase extends AbstractDescriptorTestCase 62 { 63 private String m_key; 64 65 public ExtensionDescriptorTestCase( String name ) 66 { 67 super( name ); 68 } 69 70 public void setUp() 71 { 72 m_key = ExtensionDescriptorTestCase.class.getName(); 73 } 74 75 protected Descriptor getDescriptor() 76 { 77 return new ExtensionDescriptor( m_key, getProperties()); 78 } 79 80 protected void checkDescriptor(Descriptor desc) 81 { 82 super.checkDescriptor(desc); 83 ExtensionDescriptor ext = (ExtensionDescriptor) desc; 84 85 assertEquals( m_key, ext.getKey() ); 86 } 87 88 public void testConstructor() 89 { 90 try 91 { 92 new ExtensionDescriptor(null, getProperties()); 93 fail("Did not throw the expected NullPointerException"); 94 } 95 catch(NullPointerException npe) 96 { 97 } 99 } 100 } | Popular Tags |