1 22 package org.jboss.test.system.metadata.attributes.test; 23 24 import java.util.List ; 25 26 import org.jboss.system.metadata.ServiceAttributeMetaData; 27 import org.jboss.system.metadata.ServiceMetaData; 28 29 35 public class AttributeUnitTestCase extends AbstractAttributeTest 36 { 37 public AttributeUnitTestCase(String name) 38 { 39 super(name); 40 } 41 42 public void testAttributeNone() throws Exception 43 { 44 noAttributes(); 45 } 46 47 public void testAttributeOne() throws Exception 48 { 49 ServiceAttributeMetaData attribute = unmarshallSingleAttribute(); 50 assertTextAttribute(attribute); 51 } 52 53 public void testAttributeTwo() throws Exception 54 { 55 List <ServiceAttributeMetaData> attributes = unmarshallMultipleAttributes(2); 56 ServiceAttributeMetaData test = attributes.get(0); 57 assertTextAttribute(test, "Attribute1", "value1"); 58 test = attributes.get(1); 59 assertTextAttribute(test, "Attribute2", "value2"); 60 } 61 62 public void testAttributeNoValue() throws Exception 63 { 64 noAttributes(); 65 } 66 67 public void testAttributeEmptyValue() throws Exception 68 { 69 noAttributes(); 70 } 71 72 public void testAttributeNoTrim() throws Exception 73 { 74 ServiceAttributeMetaData attribute = unmarshallSingleAttribute(); 75 assertTextAttribute(attribute, false, true); 76 } 77 78 public void testAttributeNoReplace() throws Exception 79 { 80 ServiceAttributeMetaData attribute = unmarshallSingleAttribute(); 81 assertTextAttribute(attribute, true, false); 82 } 83 84 protected void assertOthers(ServiceMetaData metaData) throws Exception 85 { 86 super.assertOthers(metaData); 87 assertNoDependencies(metaData); 88 } 89 } 90 | Popular Tags |