inlinecontentservicetest.java.svn-base
来自「EJB3 Annotation Sample」· SVN-BASE 代码 · 共 62 行
SVN-BASE
62 行
/* * To change this template, choose Tools | Templates * and open the template in the editor. */package com.s7turn.entities.test;import com.bm.testsuite.BaseSessionBeanFixture;import com.bm.testsuite.dataloader.EntityInitialDataSet;import com.s7turn.content.entities.InlineContent;import com.s7turn.content.session.ContentServiceBean;import java.util.Map;/** * * @author Long */public class InlineContentServiceTest extends BaseSessionBeanFixture<ContentServiceBean> { private final static Class[] usedBeans = new Class[]{ InlineContent.class }; public InlineContentServiceTest() { super( ContentServiceBean.class, usedBeans, new InlineContentInitDataSet() ); } public void testLoadInlineContent() { ContentServiceBean cvb = this.getBeanToTest(); Map map = cvb.loadInlineContent("/home/logo.html", "en_US"); assertNotNull( map ); assertTrue( map.size() > 0 ); assertNotNull( map.get("user.title") ); } public static class InlineContentInitDataSet extends EntityInitialDataSet<InlineContent>{ public InlineContentInitDataSet() { super( InlineContent.class ); } public void create() { InlineContent ic = new InlineContent(); ic.setBody("Test cont"); ic.setContentKey("user.title"); ic.setLocale("en_US"); ic.setResourceId("/home/logo.html"); this.add( ic ); ic = new InlineContent(); ic.setBody("user password"); ic.setContentKey("user.password"); ic.setLocale("en_US"); ic.setResourceId("/home/logo.html"); this.add( ic ); } }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?