nonnumericitemtestcase.java

来自「xbrlapi的源码」· Java 代码 · 共 46 行

JAVA
46
字号
package org.xbrlapi.fragment.tests;import org.xbrlapi.DOMLoadingTestCase;import org.xbrlapi.FragmentList;import org.xbrlapi.NonNumericItem;/** * Tests the implementation of the org.xbrlapi.NonNumericItem interface. * Uses the DOM-based data store to ensure rapid testing. * @author Geoffrey Shuetrim (geoff@galexy.net) */public class NonNumericItemTestCase extends DOMLoadingTestCase {	private final String STARTING_POINT = "test.data.tuple.instance";		protected void setUp() throws Exception {		super.setUp();		loader.discover(this.getURL(STARTING_POINT));			}	protected void tearDown() throws Exception {		super.tearDown();	}			public NonNumericItemTestCase(String arg0) {		super(arg0);	}	/**	 * Test getting all child facts.	 */	public void testGetAllChildFacts() {		try {		    FragmentList<NonNumericItem> items = store.<NonNumericItem>getFragments("NonNumericItem");		    assertTrue(items.getLength() > 0);		    for (NonNumericItem fact: items) {		        if (fact.getLocalname().equals("managementTitle") ) {		            assertEquals("My Title", fact.getValue().substring(0,fact.getValue().length()-1));		        }		    }		} catch (Exception e) {			fail(e.getMessage());		}	}	}

⌨️ 快捷键说明

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