报告使用 @Deployment
注解的方法的错误返回类型。
根据 Arquillian 文档,使用 @Deployment
注解的方法必须具有从 ShrinkWrap 存档继承的返回类型。
示例:
// 这个测试用例不能被 Arquillian 启动
@RunWith(Arquillian.class)
public class SomeTest {
@Deployment
public static ZipFile createDeployment() {
throw new UnsupportedOperationException("Implement me");
}
@Test
public void testSomething() {
Assert.fail("To be implemented");
}
}
在应用快速修复后:
import org.jboss.shrinkwrap.api.Archive;
@RunWith(Arquillian.class)
public class SomeTest {
@Deployment
public static Archive createDeployment() {
throw new UnsupportedOperationException("Implement me");
}
@Test
public void testSomething() {
Assert.fail("To be implemented");
}
}