在Eclipse中,失败时如何查看Assert.assertEquals的输入? [英] In Eclipse, how do I see the input to Assert.assertEquals when it fails?

查看:392
本文介绍了在Eclipse中,失败时如何查看Assert.assertEquals的输入?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不是Eclipse专家,所以请原谅我的笨拙.

I'm not much of an Eclipse guru, so please forgive my clumsiness.

在Eclipse中,当我调用Assert.assertEquals(obj1,obj2)失败时,如何使IDE向我显示obj1和obj2?

In Eclipse, when I call Assert.assertEquals(obj1,obj2) and that fails, how do I get the IDE to show me obj1 and obj2?

我正在使用 JExample ,但我想那不应该做出改变.

I'm using JExample, but I guess that shouldn't make a difference.

编辑:这是我看到的内容:

(来源: yfrog.com )

Edit: Here's what I see:

(source: yfrog.com)
.

推荐答案

如果JUnit视图中的信息不足以满足您的需求,则可以始终在例如java.lang.AssertionError上设置异常断点.运行测试时,调试器将在实际引发异常之前立即停止.

If the information in the JUnit view is not enough for you, you can always set a exception breakpoint on, for example, java.lang.AssertionError. When running the test, the debugger will stop immediately before the exception is actually being thrown.

这篇关于在Eclipse中,失败时如何查看Assert.assertEquals的输入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆