documentdeletiontestcase.java

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

JAVA
50
字号
package org.xbrlapi.data.dom.tests;import org.xbrlapi.utilities.XBRLException;/** * Test the XML DOM XBRLAPI Store implementation. * @author Geoffrey Shuetrim (geoff@galexy.net) */public class DocumentDeletionTestCase extends BaseTestCase {	private final String STARTING_POINT = "test.data.label.links";		protected void setUp() throws Exception {		super.setUp();		loader.discover(this.getURL(STARTING_POINT));			}	protected void tearDown() throws Exception {		super.tearDown();	}	public DocumentDeletionTestCase(String arg0) {		super(arg0);	}	public void testDeleteSingleDocument() {		try {			store.deleteDocument(this.getURL(STARTING_POINT));			assertFalse(store.getStoredURLs().contains(this.getURL(STARTING_POINT)));		} catch (XBRLException e) {			e.printStackTrace();			fail(e.getMessage());		}	}	public void testDeleteRelatedDocuments() {		try {			int initialSize = store.getStoredURLs().size();			store.deleteRelatedDocuments(this.getURL(STARTING_POINT));			assertFalse(store.getStoredURLs().contains(this.getURL(STARTING_POINT)));			assertEquals(initialSize-3,store.getStoredURLs().size());		} catch (XBRLException e) {			e.printStackTrace();			fail(e.getMessage());		}	}		}

⌨️ 快捷键说明

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