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

📄 periodtest.java

📁 模拟简单的会计信息录入管理应用
💻 JAVA
字号:
package org.operamasks.example.ejb.gl.service;import static org.junit.Assert.fail;import java.util.Date;import org.junit.After;import org.junit.Before;import org.junit.Test;import org.operamasks.example.ejb.gl.entity.Period;import org.operamasks.example.ejb.gl.service.IPeriodService;public class PeriodTest {	private IPeriodService periodService;	@Test	public void testCreatePeriod() {		Period period = new Period();		period.setId("period1");		period.setBeginDate(new Date());		period.setNumber("001.002");		period.setPeriodNumber(1);		period.setPeriodQuarter(6);		period.setPeriodNumber(12);		period.setEndDate(new Date());		periodService.createPeriod(period);	}	@Test	public void testModifyPeriod() {		Period period = periodService.getPeriod("period1");		if (period != null) {			period.setNumber("002.001");			periodService.modifyPeriod(period);		}	}	@Test	public void testRemovePeriod() {		Period period = periodService.getPeriod("period1");		if (period != null) {						periodService.removePeriod(period);		}	}	@Test	public void testListPeriod() {		//fail("Not yet implemented");	}	@Before	public void setUp() throws Exception {		java.util.Properties p = new java.util.Properties();		p.put(javax.naming.Context.PROVIDER_URL, "iiop://127.0.0.1:6888");		p.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,				"com.apusic.naming.jndi.CNContextFactory");		javax.naming.InitialContext initCtx = new javax.naming.InitialContext(p);		this.periodService = (IPeriodService) initCtx				.lookup("org.operamasks.example.gl.service.PeriodService");	}	@After	public void tearDown() throws Exception {		this.periodService = null;	}}

⌨️ 快捷键说明

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