【问题标题】:Assert import intellij断言导入 intellij
【发布时间】:2017-08-09 21:13:52
【问题描述】:

我遇到了问题,我刚刚克隆了我的项目 => 在 intellij 中打开项目 => 所有导入工作正常,除了断言导入

import org.junit.Assert;

我依赖 pom 文件 =>

    <dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <version>4.12</version>
</dependency>

有人可以帮我吗? Idea抛出此错误“无法解析符号“断言”见附件截图enter image description here

【问题讨论】:

  • 为什么会有两次依赖?问题是什么?你看到什么错误?请提供minimal reproducible example
  • 编辑描述并添加截图

标签: junit automation automated-tests assert


【解决方案1】:

你尝试改变

import org.junit.Assert;

import static org.junit.Assert.*;

我解决了。

【讨论】:

    猜你喜欢
    • 2021-05-24
    • 2022-06-28
    • 2015-03-02
    • 1970-01-01
    • 1970-01-01
    • 2020-03-28
    • 1970-01-01
    • 1970-01-01
    • 2012-01-26
    相关资源
    最近更新 更多