Модератор: Модераторы





package ru.printbroker.model;
// Generated 20.10.2009 11:30:43 by Hibernate Tools 3.2.1.GA
import java.util.HashSet;
import java.util.Set;
/**
 * Papergroup generated by hbm2java
 */
public class Papergroup  implements java.io.Serializable {
     private int pkPaperGroup;
     private String namePaperGroup;
     private Set papertypes = new HashSet(0);
    public Papergroup() {
    }
   
    public Papergroup(int pkPaperGroup) {
        this.pkPaperGroup = pkPaperGroup;
    }
    public Papergroup(int pkPaperGroup, String namePaperGroup, Set papertypes) {
       this.pkPaperGroup = pkPaperGroup;
       this.namePaperGroup = namePaperGroup;
       this.papertypes = papertypes;
    }
   
    public int getPkPaperGroup() {
        return this.pkPaperGroup;
    }
    
    public void setPkPaperGroup(int pkPaperGroup) {
        this.pkPaperGroup = pkPaperGroup;
    }
    public String getNamePaperGroup() {
        return this.namePaperGroup;
    }
    
    public void setNamePaperGroup(String namePaperGroup) {
        this.namePaperGroup = namePaperGroup;
    }
    public Set getPapertypes() {
        return this.papertypes;
    }
    
    public void setPapertypes(Set papertypes) {
        this.papertypes = papertypes;
    }
}
/*
 * 
 * 
 */
package ru.printbroker.model;
import java.util.Set;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;
/**
 *
 * @author pikin
 */
public class PapergroupTest {
    public PapergroupTest() {
    }
    @BeforeClass
    public static void setUpClass() throws Exception {
    }
    @AfterClass
    public static void tearDownClass() throws Exception {
    }
    @Before
    public void setUp() {
    }
    @After
    public void tearDown() {
    }
    /**
     * Test of getPkPaperGroup method, of class Papergroup.
     */
    @Test
    public void testGetPkPaperGroup() {
        System.out.println("getPkPaperGroup");
        Papergroup instance = new Papergroup();
        int expResult = 0;
        int result = instance.getPkPaperGroup();
        assertEquals(expResult, result);
        // TODO review the generated test code and remove the default call to fail.
        fail("The test case is a prototype.");
    }
    /**
     * Test of setPkPaperGroup method, of class Papergroup.
     */
    @Test
    public void testSetPkPaperGroup() {
        System.out.println("setPkPaperGroup");
        int pkPaperGroup = 0;
        Papergroup instance = new Papergroup();
        instance.setPkPaperGroup(pkPaperGroup);
        // TODO review the generated test code and remove the default call to fail.
        fail("The test case is a prototype.");
    }
    /**
     * Test of getNamePaperGroup method, of class Papergroup.
     */
    @Test
    public void testGetNamePaperGroup() {
        System.out.println("getNamePaperGroup");
        Papergroup instance = new Papergroup();
        String expResult = "";
        String result = instance.getNamePaperGroup();
        assertEquals(expResult, result);
        // TODO review the generated test code and remove the default call to fail.
        fail("The test case is a prototype.");
    }
    /**
     * Test of setNamePaperGroup method, of class Papergroup.
     */
    @Test
    public void testSetNamePaperGroup() {
        System.out.println("setNamePaperGroup");
        String namePaperGroup = "";
        Papergroup instance = new Papergroup();
        instance.setNamePaperGroup(namePaperGroup);
        // TODO review the generated test code and remove the default call to fail.
        fail("The test case is a prototype.");
    }
    /**
     * Test of getPapertypes method, of class Papergroup.
     */
    @Test
    public void testGetPapertypes() {
        System.out.println("getPapertypes");
        Papergroup instance = new Papergroup();
        Set expResult = null;
        Set result = instance.getPapertypes();
        assertEquals(expResult, result);
        // TODO review the generated test code and remove the default call to fail.
        fail("The test case is a prototype.");
    }
    /**
     * Test of setPapertypes method, of class Papergroup.
     */
    @Test
    public void testSetPapertypes() {
        System.out.println("setPapertypes");
        Set papertypes = null;
        Papergroup instance = new Papergroup();
        instance.setPapertypes(papertypes);
        // TODO review the generated test code and remove the default call to fail.
        fail("The test case is a prototype.");
    }
}



А в процессе дополнения класса Papergroup - в тестовом классе автоматом появляются шаблоны новых тестов?


vada писал(а):Причем, правильность программы можно доказать математически.
Разница между теорией и практикой на практике гораздо глубже чем разница между теорией и практикой в теории...
Разница между теорией и практикой на практике гораздо глубже чем разница между теорией и практикой в теории...


vada писал(а):Только на практике ни один нормальный заказчик не пример работу без JUNIT тестов.
Сейчас этот форум просматривают: Google [Bot] и гости: 1