⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 referenceparttestcase.java

📁 xbrlapi的源码
💻 JAVA
字号:
package org.xbrlapi.fragment.tests;import org.xbrlapi.DOMLoadingTestCase;import org.xbrlapi.FragmentList;import org.xbrlapi.ReferencePart;import org.xbrlapi.ReferencePartDeclaration;import org.xbrlapi.ReferenceResource;/** * Tests the implementation of the org.xbrlapi.ReferencePart interface. * Uses the DOM-based data store to ensure rapid testing. * @author Geoffrey Shuetrim (geoff@galexy.net) */public class ReferencePartTestCase extends DOMLoadingTestCase {	private final String STARTING_POINT = "test.data.reference.links";		protected void setUp() throws Exception {		super.setUp();		loader.discover(this.getURL(STARTING_POINT));			}	protected void tearDown() throws Exception {		super.tearDown();	}			public ReferencePartTestCase(String arg0) {		super(arg0);	}		public void testGetValue() {			try {			FragmentList<ReferenceResource> fragments = store.<ReferenceResource>getFragments("ReferenceResource");			ReferenceResource fragment = fragments.getFragment(0);						ReferencePart part = fragment.getReferenceParts().getFragment(0);			assertEquals("Fixed Assets", part.getValue());		} catch (Exception e) {			e.printStackTrace();			fail(e.getMessage());		}	}		public void testGetReferencePartDeclaration() {			try {			FragmentList<ReferenceResource> fragments = store.<ReferenceResource>getFragments("ReferenceResource");			ReferenceResource fragment = fragments.getFragment(0);						ReferencePart part = fragment.getReferenceParts().getFragment(0);			store.serialize(part.getDataRootElement());			ReferencePartDeclaration declaration = part.getDeclaration();			assertEquals(part.getLocalname(),declaration.getName());			assertEquals(part.getNamespaceURI(),declaration.getTargetNamespaceURI());		} catch (Exception e) {			e.printStackTrace();			fail(e.getMessage());		}	}		}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -