【问题标题】:Can't find "Result Comparison" dialog in Eclipse Oxygen在 Eclipse Oxygen 中找不到“结果比较”对话框
【发布时间】:2017-11-28 16:31:45
【问题描述】:

下面的页面(向下滚动到 Assertions 子标题)是指用于比较 JUnit 5 测试的预期输出和实际输出的结果比较对话框。我找不到它。有人可以指点我吗?在Failure Trace视图中,有一个“Compare Actual with Expected Test Result”按钮,但是是灰色的。

https://www.eclipse.org/community/eclipse_newsletter/2017/october/article5.php

【问题讨论】:

    标签: eclipse junit5


    【解决方案1】:

    在Eclipse Oxygen 4.7.1a中,在执行以下测试时,我只需双击JUnit中Failure Trace面板的第一行 视图,结果比较窗口打开。

    @org.junit.jupiter.api.Test
    void groupedAssertions() {
        org.junit.jupiter.api.Assertions.assertAll(
            () -> org.junit.jupiter.api.Assertions.assertEquals("Johnny", "John"),
            () -> org.junit.jupiter.api.Assertions.assertEquals("Dep", "Doe")
        );
    }
    

    【讨论】:

    • 我(重新)尝试过,但仍然没有工作。我使用的是 4.7.1a,但工作区最初是由 Neon 创建的。创建了一个新的工作区,它现在可以工作了!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-05-31
    • 2016-01-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-06-02
    相关资源
    最近更新 更多