testsubsection.java~4~

来自「数据库应用程序.它比较全面的含盖了JAVA应用程序与数据库之间通讯的全过程.本程」· JAVA~4~ 代码 · 共 31 行

JAVA~4~
31
字号
package chapter25;
import junit.framework.*;
public class TestSubsection
    extends TestCase
{
    private Subsection subsection = null;

    protected void setUp() throws Exception {
        super.setUp();
        subsection = new Subsection();
    }

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

    public void testGetValue() {
       int d1 = -3,y1 = 3;
       int d2 = -2,y2 = 4;
       int d3 = 0 ,y3 = 100;
       int d4 = 2 ,y4 = 8;
       int d5 = 33 ,y5 = Integer.MAX_VALUE;
       assertEquals(y1,subsection.getValue(d1));
       assertEquals(y2,subsection.getValue(d2));
       assertEquals(y3,subsection.getValue(d3));
       assertEquals(y4,subsection.getValue(d4));
       assertEquals(y5,subsection.getValue(d5));
    }
}

⌨️ 快捷键说明

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