📄 testrankservice.java
字号:
package org.operamasks.example.hr.test;import static org.junit.Assert.fail;import java.util.UUID;import org.junit.After;import org.junit.Before;import org.junit.Test;import org.operamasks.example.ejb.hr.entity.Rank;import org.operamasks.example.ejb.hr.service.IRankService;public class TestRankService { private IRankService rankService; @Test public void testCreateRank() { String[] datas = {"初级工程师", "中级工程师", "高级工程师"}; for(String data : datas) { Rank rank = new Rank(); rank.setId(UUID.randomUUID().toString()); rank.setName(data); rankService.createRank(rank); } } @Test public void testModifyRank() { fail("Not yet implemented"); } @Test public void testRemoveRank() { fail("Not yet implemented"); } @Test public void testListRank() { 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.rankService = (IRankService) initCtx.lookup("org.operamasks.example.hr.service.RankService"); } @After public void tearDown() throws Exception { this.rankService=null; }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -