1 13 package info.magnolia.cms.module; 14 15 import junit.framework.TestCase; 16 17 21 public class ModuleDefinitionTest extends TestCase { 22 private ModuleDefinition md; 23 24 protected void setUp() throws Exception { 25 super.setUp(); 26 md = new ModuleDefinition(); 27 PropertyDefinition p1 = new PropertyDefinition(); 28 PropertyDefinition p2 = new PropertyDefinition(); 29 PropertyDefinition p3 = new PropertyDefinition(); 30 p1.setName("abc"); 31 p1.setValue("123"); 32 p2.setName("baby"); 33 p2.setValue("you and me"); 34 p3.setName("doremi"); 35 p3.setValue("la la la"); 36 md.addProperty(p1); 37 md.addProperty(p2); 38 md.addProperty(p3); 39 } 40 41 public void testGetPropertyJustWorks() { 42 assertEquals("you and me", md.getProperty("baby")); 43 } 44 45 public void testGetPropertyReturnsNullForUnknownProperties() { 46 assertEquals(null, md.getProperty("Blame it on the boogie")); 47 } 48 49 } 50 | Popular Tags |