English 中文(简体)
任何EJB单位测试图书馆,支持遗产战略TABLE_PER_CLASS。
原标题:Any EJB unit test library that supports Inheritance strategy TABLE_PER_CLASS?

我有一个超级实体级,其继承战略在我EJB项目中界定。 我试图利用EJB3Unit进行单位测试,但只是为了认识到“继承战略”TABLE_PER_CLASS没有得到EJB3Unit的支持。 那里是否有任何其他测试图书馆提供支持? 我试图 go笑,但没有任何东西。

Testsuite: entity.DepartmentTest
Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec

------------- Standard Error -----------------
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Applications/NetBeans/glassfish-3.1.1/glassfish/modules/weld-osgi-bundle.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Applications/NetBeans/glassfish-3.1.1/glassfish/modules/bean-validator.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: The requested version 1.5.10 by your slf4j binding is not compatible with [1.6]
SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further details.
------------- ---------------- ---------------
Null Test:  Caused an ERROR
null
null
java.lang.ExceptionInInitializerError
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:169)
Caused by: java.lang.RuntimeException: Inheritance strategy TABLE_PER_CLASS not (yet) supported.
    at com.bm.introspectors.EntityBeanIntrospector.processInheritance(EntityBeanIntrospector.java:475)
    at com.bm.introspectors.EntityBeanIntrospector.processAnnotations(EntityBeanIntrospector.java:160)
    at com.bm.introspectors.EntityBeanIntrospector.getEntityBeanIntrospector(EntityBeanIntrospector.java:90)
    at com.bm.introspectors.relations.RelationPropertyResolver.findAttributeForRelationAtOtherSide(RelationPropertyResolver.java:67)
    at com.bm.introspectors.AbstractPersistentClassIntrospector.processNonIdAnnotations(AbstractPersistentClassIntrospector.java:373)
    at com.bm.introspectors.AbstractPersistentClassIntrospector.processAnnotations(AbstractPersistentClassIntrospector.java:254)
    at com.bm.introspectors.AbstractPersistentClassIntrospector.processAccessTypeField(AbstractPersistentClassIntrospector.java:91)
    at com.bm.introspectors.EntityBeanIntrospector.processAccessTypeField(EntityBeanIntrospector.java:177)
    at com.bm.introspectors.EntityBeanIntrospector.processAnnotations(EntityBeanIntrospector.java:154)
    at com.bm.introspectors.EntityBeanIntrospector.getEntityBeanIntrospector(EntityBeanIntrospector.java:90)
    at com.bm.datagen.relation.BeanCollectionGenerator.<init>(BeanCollectionGenerator.java:94)
    at entity.DepartmentTest$MyEmoloyeeCreator.<init>(DepartmentTest.java:30)
    at entity.DepartmentTest$MyEmoloyeeCreator.<init>(DepartmentTest.java:27)
    at entity.DepartmentTest.<clinit>(DepartmentTest.java:19)


Test entity.DepartmentTest FAILED
test:
Deleting: /var/folders/xb/xbJfmQ0UGrCP0lmSoZFT4E+++TI/-Tmp-/TEST-entity.DepartmentTest.xml
BUILD SUCCESSFUL (total time: 8 seconds)
问题回答

或许可以查禁公开EJB。 http://openejb.apache.org/3.0/injection-of-entitymanager-example.html“rel=“nofollow”>example, 使用了JPA。 我不知道这是否涉及你的准确情况,但应该足够接近。

请注意,download page,其中约有12个例子,如: 所有这些都是单位测试,基本上涵盖了欧洲黄麻和黄麻制品协会的全方位,包括多边开发银行、网络服务、交易、安全,当然还有诸如日本邮局、数据等基本物品。





相关问题
run unit tests and coverage in certain python structure

I have some funny noob problem. I try to run unit tests from commandline: H:PROpyEstimator>python src estpython est_power_estimator.py Traceback (most recent call last): File "src est...

How to unit-test an enterprise symfony project?

I´m working on a huge project at my work. We have about 200 database tables, accordingly a huge number of Models, Actions and so on. How should I begin to write tests for this? My biggest problem ...

Code Coverage Tools & Visual Studio 2008 Pro

Just wondering what people are using for code coverage tools when using MS Visual Studio 2008 Pro. We are using the built-in MS test project and unit testing tool (the one that come pre-installed ...

Unit testing. File structure

I have a C++ legacy codebase with 10-15 applications, all sharing several components. While setting up unittests for both shared components and for applications themselves, I was wondering if there ...

Unit Testing .NET 3.5 projects using MStest in VS2010

There s a bug/feature in Visual Studio 2010 where you can t create a unit test project with the 2.0 CLR. https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=483891&wa=...

Unit Test for Exceptions Message

Is there a simple (Attribute-driven) way to have the following test fail on the message of the exception. [TestMethod()] [ExpectedException(typeof(ArgumentException))] public void ExceptionTestTest() ...

热门标签