1. @RunWith(SpringJUnit4ClassRunner.class)  
  2. @ContextConfiguration({"classpath:/xml/applicationContextTest.xml"})  
  3. @TransactionConfiguration(transactionManager = "tm_cmail_web")  
  4. @Transactional  
  5. public class SysModelTest {  
  6.   
  7.     @Resource  
  8.     private WebSysModelService modelService;  
  9.       
  10.     @Test  
  11.     @Transactional  
  12.     @Rollback(true)  
  13.     public void testCreate(){  
  14.         WebSysModel m=new WebSysModel();  
  15.         m.setModelMid("HelloDing");  
  16.         m.setModelName("ding");  
  17.         m.setCreateTime(Calendar.getInstance().getTime());  
  18.         m.setModfiyTime(Calendar.getInstance().getTime());  
  19.         short s=1;  
  20.         m.setModelType(s);  
  21.         m.setModelUrlType(s);  
  22.           
  23.         modelService.create(m);  
  24.     }  
  25.       
  26. }  


来自为知笔记(Wiz)


posted on 2017-04-04 17:09  duenboa  阅读(164)  评论(0编辑  收藏  举报