`
lijunaccp
  • 浏览: 153371 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

Junit4断言

 
阅读更多
Junit4中添加了一个用于比较数组的新断言,比较两个数组相等

package com.lijun;

import static org.junit.Assert.*;

import org.junit.Test;

public class Junit4Test {

	@Test
	public void testArrayAssert() {
		String users[] = new String[]{"tom","john","tony"};
		assertArrayEquals(new String[]{"tom","john","tony"}, users);
	}
}

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics