コード例 #1
0
 /** Test of updateBeleg method, of class BelegService. */
 @Test
 @Ignore
 public void testUpdateBeleg() throws Exception {
   System.out.println("updateBeleg");
   BelegDTO beleg = null;
   BelegService instance = null;
   BelegDTO expResult = null;
   BelegDTO result = instance.updateBeleg(beleg);
   assertEquals(expResult, result);
   // TODO review the generated test code and remove the default call to fail.
   fail("The test case is a prototype.");
 }
コード例 #2
0
 /** Test of loadBelegByUuid method, of class BelegService. */
 @Ignore
 @Test
 public void testLoadBelegByUuid() throws Exception {
   System.out.println("loadBelegByUuid");
   BelegTyp type = null;
   String uuid = "";
   BelegService instance = null;
   BelegDTO expResult = null;
   BelegDTO result = instance.loadBelegByUuid(type, uuid);
   assertEquals(expResult, result);
   // TODO review the generated test code and remove the default call to fail.
   fail("The test case is a prototype.");
 }
コード例 #3
0
 /** Test of loadPositionenByProjektId method, of class BelegService. */
 @Test
 @Ignore
 public void testLoadPositionenByProjektId() throws Exception {
   System.out.println("loadPositionenByProjektId");
   BelegTyp type = null;
   Integer pId = null;
   Status status = null;
   BelegService instance = null;
   List expResult = null;
   List result = instance.loadPositionenByProjektId(type, pId, status);
   assertEquals(expResult, result);
   // TODO review the generated test code and remove the default call to fail.
   fail("The test case is a prototype.");
 }
コード例 #4
0
 /** Test of loadBelegById method, of class BelegService. */
 @Test
 public void testLoadBelegById() throws Exception {
   System.out.println("loadBelegById");
   BelegSearchRequest searchReq = new BelegSearchRequest();
   searchReq.setSearchType(SearchType.ALL_RECORDS);
   searchReq.setBelegType(BelegTyp.AUFTRAG);
   searchReq.setLimit(10);
   searchReq.setMandantenId(2);
   List<BelegKopfDTO> beList = testee.searchBeleg(searchReq);
   assertNotNull("searchBelege,  Liste hat keine Einträge", beList);
   assertEquals("searchBelege,  Liste hat keine 10 Einträge", 10, beList.size());
   BaseDTO expResult = (BaseDTO) beList.get(2);
   BelegDTO result = testee.loadBelegById(BelegTyp.AUFTRAG, expResult.getId());
   BaseDTO testResult = (BaseDTO) result;
   assertEquals("Beleg nicht geladen ID=" + expResult.getId(), expResult, testResult);
 }
コード例 #5
0
 /** Test of createBeleg method, of class BelegService. */
 @Test
 public void testCreateBeleg() throws Exception {
   System.out.println("createBeleg");
   BelegDTO expResult = createTestBeleg();
   BelegDTO result = testee.createBeleg(expResult);
   assertNotNull("Beleg.ID ==null", result.getId());
   assertTrue("Beleg.ID ==0", result.getId() > 0);
   compareBelege(expResult, result);
   testee.deleteBeleg(result);
   BelegDTO delBeleg = null;
   try {
     delBeleg = testee.loadBelegById(result.getBelegTyp(), result.getId());
   } catch (TomException tomException) {
     // Excpected
   }
   assertNull("Error deleting Beleg " + delBeleg, delBeleg);
 }
コード例 #6
0
 /** Test of checkBelegByNumber method, of class BelegService. */
 @Ignore
 @Test
 public void testCheckBelegByNumber() throws Exception {
   System.out.println("checkBelegByNumber");
   BelegSearchRequest searchReq = new BelegSearchRequest();
   searchReq.setSearchType(SearchType.ALL_RECORDS);
   searchReq.setBelegType(BelegTyp.AUFTRAG);
   searchReq.setLimit(10);
   searchReq.setMandantenId(2);
   List<BelegKopfDTO> beList = testee.searchBeleg(searchReq);
   assertNotNull("searchBelege,  Liste hat keine 10 Einträge", beList);
   assertEquals("searchBelege,  Liste hat keine 10 Einträge", 10, beList.size());
   BaseDTO expResult = (BaseDTO) beList.get(3);
   Integer belegNr = beList.get(3).getNummer();
   boolean result = testee.checkBelegByNumber(BelegTyp.AUFTRAG, belegNr);
   assertTrue("result should be true but was false", result);
   boolean result2 = testee.checkBelegByNumber(BelegTyp.AUFTRAG, -1);
   assertFalse("result should be false but was true", result2);
 }
コード例 #7
0
 /** Test of searchBeleg method, of class BelegService. */
 @Test
 public void testSearchBeleg() throws Exception {
   System.out.println("searchBeleg");
   BelegSearchRequest searchReq = new BelegSearchRequest();
   searchReq.setSearchType(SearchType.ALL_RECORDS);
   searchReq.setBelegType(BelegTyp.AUFTRAG);
   searchReq.setLimit(10);
   searchReq.setMandantenId(2);
   List result = testee.searchBeleg(searchReq);
   assertNotNull("searchBelege,  Liste hat keine Einträge", result);
   assertEquals("searchBelege,  Liste hat keine 10 Einträge", 10, result.size());
 }