abouttests.java.svn-base

来自「spring+hibernate做的网上订餐系统」· SVN-BASE 代码 · 共 32 行

SVN-BASE
32
字号
package com.pure.domain;

import junit.framework.TestCase;

public class AboutTests extends TestCase {

	protected void setUp() throws Exception {
		super.setUp();
	}
	
	public void testAboutEquals(){
		About a = new About();
		a.setId(new Long(1));
		a.setName("购物指南");
		a.setContent("关于如何购物的帮助文档");
		
		About b = new About();
		b.setId(new Long(1));
		b.setName("购物指南");
		b.setContent("关于如何购物的帮助文档");
		
		assertEquals(true,a.equals(b));
		System.out.println(a.hashCode());
		System.out.println(b.hashCode());
	}
	
	protected void tearDown() throws Exception {
		super.tearDown();
	}

}

⌨️ 快捷键说明

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