FileDocCategorySizeDatePackage
GOMAttributeImplTest.javaAPI DocApache Lucene 2.1.02530Wed Feb 14 10:45:58 GMT 2007org.apache.lucene.gdata.gom.core

GOMAttributeImplTest

public class GOMAttributeImplTest extends TestCase
author
Simon Willnauer

Fields Summary
protected GOMAttributeImpl
gomAttribute
Constructors Summary
Methods Summary
protected voidsetUp()

		gomAttribute = new GOMAttributeImpl("test", "test");
	
public voidtestGOMAttributeImplStringString()

		GOMAttributeImpl impl = new GOMAttributeImpl("test", "test");
		assertTrue(impl.hasDefaultNamespace());
		assertTrue(impl.getLocalName().equals(impl.getTextValue()));
		assertEquals("test", impl.getLocalName());

	
public voidtestGOMAttributeImplStringStringStringString()

		GOMAttributeImpl impl = new GOMAttributeImpl("www.apache.org", "ap",
				"test", "test");
		assertFalse(impl.hasDefaultNamespace());
		assertTrue(impl.getLocalName().equals(impl.getTextValue()));
		assertEquals("test", impl.getLocalName());
		assertEquals("www.apache.org", impl.getQname().getNamespaceURI());
		assertEquals("ap", impl.getQname().getPrefix());
	
public voidtestGetQname()

		QName qname = gomAttribute.getQname();
		assertSame(qname, gomAttribute.getQname());
		assertTrue(gomAttribute.hasDefaultNamespace());
		gomAttribute.setNamespaceUri("something else");
		assertNotSame(qname, gomAttribute.getQname());
		assertFalse(gomAttribute.hasDefaultNamespace());