Laboratorija za računarsku tehniku

Softverske teme => Java => Programiranja => Testing => Temu započeo: maxogm 22.04.2011, 11:55

Naslov: Primer Suite i test-a
Poruka od: maxogm 22.04.2011, 11:55
Junit suite

@RunWith(Suite.class)
@Suite.SuiteClasses( {
   // DAO 
   LevelGroupDAOTest.class,
   ClientGroupDAOTest.class,
   UserGroupsDAOTest.class,
   UserDAOTest.class,
   
//    Bussines logic
   CoreServicesImplTest.class
})

public class MosaicCoreAllTests
{
}


Primer testa:

public class LevelGroupDAOTest
{
   // ------------------------------------------------------------------------------------------------------------------
   /**
    * @throws java.lang.Exception
    */
   @BeforeClass
   public static void setUpBeforeClass() throws Exception
   {

   }

   // ------------------------------------------------------------------------------------------------------------------
   /**
    * @throws java.lang.Exception
    */
   @AfterClass
   public static void setUpAfterClass() throws Exception
   {

   }

   // ------------------------------------------------------------------------------------------------------------------
   @Test
   public void testInsertLevelGroup()
   {
   }

   // ------------------------------------------------------------------------------------------------------------------
   @Test
   public void testGetLevelGroupById()
   {
   }

   // ------------------------------------------------------------------------------------------------------------------
   @Test
   public void testGetAllLevelGroups()
   {
   }
   
   // ------------------------------------------------------------------------------------------------------------------
   @Test
   public void testUpdateLevelGroup()
   {

   }
   
}