⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 comparisonfailuretest.java

📁 JUnit, java testing tool
💻 JAVA
字号:
package junit.tests.framework;import junit.framework.ComparisonFailure;import junit.framework.TestCase;public class ComparisonFailureTest extends TestCase {		// Most of the tests are in ComparisonCompactorTest	public void testConnection() {		ComparisonFailure failure= new ComparisonFailure("warning", "Mary had a little lamb", "Mary had the little lamb");		assertEquals("warning expected:<Mary had [a] little lamb> but was:<Mary had [the] little lamb>", failure.getMessage());	}		// This is like an instanceof test.	public void testThrowing() {		try {			assertEquals("a", "b");		} catch (ComparisonFailure e) {			return;		}		fail();	}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -