本文介绍了测试自定义插件portlet:BeanLocatorException和Transaction roll-back用于服务测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题:


    我可以成功测试CRUD服务操作。我在@Before [setUp()]上插入
    并在@After
    [tearDown()]上删除相同数据但是我需要支持Transactions
    而不是写入插入和删除的代码。

    我成功获取了我的实体的单个记录但是当我触发搜索查询或尝试获取多个实体时,我得到:

    I can test successfully for CRUD services operation. I was doingan insert on @Before [setUp()] and delete of same data on @After[tearDown()] but going forward I would need to support Transactionsrather than writing code for insert and delete.

    I am successful in fetching single records of my entity but when I fire a search query or try to fetch more than one of my entities I get:


我已按照以下部分链接设置Junit与Liferay:

I have followed some of the following links to set-up Junit with Liferay:




    Here you found PowerMock 1.4.12 with Mockito and JUnit including dependencies http://code.google.com/p/powermock/downloads/detail?name=powermock-mockito-junit-1.4.12.zip&can=2&q=

    这篇关于测试自定义插件portlet:BeanLocatorException和Transaction roll-back用于服务测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-27 00:37