2 * Copyright (C) 2009 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.cdm
.api
.service
;
12 import java
.io
.FileOutputStream
;
14 import org
.apache
.log4j
.Logger
;
15 import org
.junit
.Assert
;
16 import org
.junit
.Test
;
17 import org
.unitils
.database
.annotations
.Transactional
;
18 import org
.unitils
.database
.util
.TransactionMode
;
19 import org
.unitils
.dbunit
.annotation
.DataSet
;
20 import org
.unitils
.dbunit
.annotation
.ExpectedDataSet
;
21 import org
.unitils
.spring
.annotation
.SpringBeanByType
;
23 import eu
.etaxonomy
.cdm
.model
.name
.TaxonNameBase
;
24 import eu
.etaxonomy
.cdm
.test
.integration
.CdmTransactionalIntegrationTest
;
30 @Transactional(TransactionMode
.DISABLED
)
31 public class IdentifiableServiceBaseTest
extends CdmTransactionalIntegrationTest
{
32 private static final Logger logger
= Logger
.getLogger(IdentifiableServiceBaseTest
.class);
36 private INameService nameService
;
38 /****************** TESTS *****************************/
41 public final void voidTestSeriveExists(){
42 Assert
.assertNotNull("Service shoulb be initialized", nameService
);
49 public final void testGenerateTitleCache() {
50 Assert
.assertEquals("There should be 5 TaxonNames in the data set", 5, nameService
.count(TaxonNameBase
.class));
51 Class clazz
= TaxonNameBase
.class;
53 nameService
.updateTitleCache(clazz
, stepSize
, null);
54 // TaxonNameBase name = nameService.find(UUID.fromString("5d74500b-9fd5-4d18-b9cd-cc1c8a372fec"));
58 // printDataSet(new FileOutputStream("C:\\tmp\\test.xml"), new String[]{"TaxonNameBase"});
59 // } catch(Exception e) {
66 public static Logger
getLogger() {