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

📄 testemployee.java~3~

📁 数据库应用程序.它比较全面的含盖了JAVA应用程序与数据库之间通讯的全过程.本程序在JBUILDER2005上开发运行.
💻 JAVA~3~
字号:
package chapter25.db;

import junit.framework.*;
import fixture.*;

public class TestEmployee extends TestCase {
    private Employee employee = null;
    ComparisonFixture1 comparisonFixture1;

    protected void setUp() throws Exception {
        super.setUp();
        employee = new Employee("0004", "王五", 23);
        comparisonFixture1 = new ComparisonFixture1(this);
        comparisonFixture1.setUp();
    }

    protected void tearDown() throws Exception {
        employee = null;
        comparisonFixture1.tearDown();
        comparisonFixture1 = null;
        super.tearDown();
    }

    public void testEmployee() {
        String id = "0004";
        String name = "王五";
        int age = 23;
        comparisonFixture1.recordObject(employee);
        employee = new Employee(id, name, age);
        assertTrue(comparisonFixture1.compareObject(employee));

    }

}

⌨️ 快捷键说明

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