Project

General

Profile

Revision 4691e160

ID4691e160cbd992069ba611f21749e57586edca49
Parent 28fe8728
Child 3e674030

Added by Andreas Müller over 2 years ago

fix #3740 implement setPublish for subtrees

View differences:

cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/operation/PublishForSubtreeUpdater.java
47 47
    @Override
48 48
    protected void doInvoke(DefaultImportState<PublishForSubtreeConfigurator> state) {
49 49
        PublishForSubtreeConfigurator config = state.getConfig();
50
        state.getConfig().getProgressMonitor().beginTask("Update pulish flag References ", 100);
50
        state.getConfig().getProgressMonitor().beginTask("Update pulish flag", 100);
51 51

  
52
        UpdateResult result = getTaxonNodeService().setSecundumForSubtree(config.getSubtreeUuid(),  config.getNewSecundum(), config.isIncludeAcceptedTaxa(), config.isIncludeSynonyms(), config.isOverwriteExistingAccepted(), config.isOverwriteExistingSynonyms(), config.isIncludeSharedTaxa(), config.isEmptySecundumDetail(), config.getProgressMonitor());
52
        UpdateResult result = getTaxonNodeService().setPublishForSubtree(config.getSubtreeUuid(),  config.isPublish(), config.isIncludeAcceptedTaxa(), config.isIncludeSynonyms(), config.isIncludeSharedTaxa(), config.getProgressMonitor());
53 53

  
54 54
        return;
55 55

  
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/operation/config/ForSubtreeConfiguratorBase.java
32 32
    private UUID subtreeUuid;
33 33
    private boolean includeAcceptedTaxa = true;
34 34
    private boolean includeSynonyms = true;
35
    private boolean overwriteExistingAccepted = true;
36
    private boolean overwriteExistingSynonyms = true;
37 35
    private boolean includeSharedTaxa = true;
38 36
    private IProgressMonitor monitor;
39 37

  
......
70 68
        this.subtreeUuid = subtreeUuid;
71 69
    }
72 70

  
73
    public boolean isOverwriteExistingAccepted() {
74
        return overwriteExistingAccepted;
75
    }
76
    public void setOverwriteExistingAccepted(boolean overwriteExistingAccepted) {
77
        this.overwriteExistingAccepted = overwriteExistingAccepted;
78
    }
79

  
80
    public boolean isOverwriteExistingSynonyms() {
81
        return overwriteExistingSynonyms;
82
    }
83
    public void setOverwriteExistingSynonyms(boolean overwriteExistingSynonyms) {
84
        this.overwriteExistingSynonyms = overwriteExistingSynonyms;
85
    }
86 71

  
87 72
    public boolean isIncludeSynonyms() {
88 73
        return includeSynonyms;
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/operation/config/PublishForSubtreeConfigurator.java
13 13
import eu.etaxonomy.cdm.common.monitor.IProgressMonitor;
14 14
import eu.etaxonomy.cdm.io.common.IImportConfigurator;
15 15
import eu.etaxonomy.cdm.io.operation.PublishForSubtreeUpdater;
16
import eu.etaxonomy.cdm.model.reference.Reference;
17 16

  
18 17
/**
19
 * Configurator for the setSecundumForSubtree operation.
18
 * Configurator for the setPublishForSubtree operation.
20 19
 *
21 20
 * @author a.mueller
22
 * @date 06.01.2017
21
 * @date 13.09.2017
23 22
 *
24 23
 */
25 24
public class PublishForSubtreeConfigurator
......
28 27

  
29 28
    private static final long serialVersionUID = 1202667588493272030L;
30 29

  
31
    private Reference newSecundum;
32
    private boolean emptySecundumDetail = true;
33
    private IProgressMonitor monitor;
34

  
35
    /**
36
     * @param monitor the monitor to set
37
     */
38
    @Override
39
    public void setMonitor(IProgressMonitor monitor) {
40
        this.monitor = monitor;
41
    }
30
    private boolean publish = false;
42 31

  
43 32
    /**
44 33
     * @param subtreeUuid
45 34
     * @param newSecundum
46 35
     */
47
    public PublishForSubtreeConfigurator(UUID subtreeUuid, Reference newSecundum, IProgressMonitor monitor) {
36
    public PublishForSubtreeConfigurator(UUID subtreeUuid, boolean publish, IProgressMonitor monitor) {
48 37
        super(subtreeUuid, monitor);
49
        this.newSecundum = newSecundum;
38
        this.publish = publish;
50 39
    }
51 40

  
52 41
    /**
......
58 47
        // this.newSecundum = newSecundum;
59 48
    }
60 49

  
61
    public Reference getNewSecundum() {
62
        return newSecundum;
63
    }
64
    public void setNewSecundum(Reference newSecundum) {
65
        this.newSecundum = newSecundum;
50
    public boolean isPublish() {
51
        return publish;
66 52
    }
67

  
68
    public boolean isEmptySecundumDetail() {
69
        return emptySecundumDetail;
70
    }
71
    public void setEmptySecundumDetail(boolean emptySecundumDetail) {
72
        this.emptySecundumDetail = emptySecundumDetail;
73
    }
74

  
75
    /**
76
     * @return
77
     */
78
    @Override
79
    public IProgressMonitor getMonitor() {
80
        return monitor;
53
    public void setPublish(boolean publish) {
54
        this.publish = publish;
81 55
    }
82 56

  
83 57
    /**
cdmlib-io/src/main/java/eu/etaxonomy/cdm/io/operation/config/SecundumForSubtreeConfigurator.java
30 30

  
31 31
    private Reference newSecundum;
32 32
    private boolean emptySecundumDetail = true;
33
    private IProgressMonitor monitor;
33
    private boolean overwriteExistingAccepted = true;
34
    private boolean overwriteExistingSynonyms = true;
34 35

  
35
    /**
36
     * @param monitor the monitor to set
37
     */
38
    @Override
39
    public void setMonitor(IProgressMonitor monitor) {
40
        this.monitor = monitor;
41
    }
42 36

  
43 37
    /**
44 38
     * @param subtreeUuid
......
72 66
        this.emptySecundumDetail = emptySecundumDetail;
73 67
    }
74 68

  
75
    /**
76
     * @return
77
     */
78
    @Override
79
    public IProgressMonitor getMonitor() {
80
        return monitor;
69

  
70
    public boolean isOverwriteExistingAccepted() {
71
        return overwriteExistingAccepted;
72
    }
73
    public void setOverwriteExistingAccepted(boolean overwriteExistingAccepted) {
74
        this.overwriteExistingAccepted = overwriteExistingAccepted;
75
    }
76

  
77
    public boolean isOverwriteExistingSynonyms() {
78
        return overwriteExistingSynonyms;
79
    }
80
    public void setOverwriteExistingSynonyms(boolean overwriteExistingSynonyms) {
81
        this.overwriteExistingSynonyms = overwriteExistingSynonyms;
81 82
    }
82 83

  
83 84
    /**
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/hibernate/taxon/TaxonNodeDaoHibernateImpl.java
36 36
import eu.etaxonomy.cdm.model.taxon.Classification;
37 37
import eu.etaxonomy.cdm.model.taxon.Synonym;
38 38
import eu.etaxonomy.cdm.model.taxon.Taxon;
39
import eu.etaxonomy.cdm.model.taxon.TaxonBase;
39 40
import eu.etaxonomy.cdm.model.taxon.TaxonNode;
40 41
import eu.etaxonomy.cdm.model.taxon.TaxonNodeAgentRelation;
41 42
import eu.etaxonomy.cdm.persistence.dao.hibernate.common.AnnotatableDaoImpl;
......
457 458
//        query.setParameter("newSec", newSec);
458 459
//        int n = query.executeUpdate();
459 460

  
460
        String where = "SELECT t FROM TaxonNode tn JOIN tn.taxon t " +
461
                " WHERE tn.treeIndex like '%s%%' ";
461
        String queryStr = acceptedForSubtreeQueryStr(includeSharedTaxa, subTreeIndex);
462 462
        if (!overwriteExisting){
463
            where += " AND t.sec IS NULL ";
464
        }
465
        if (!includeSharedTaxa){
466
            where += " AND t.taxonNodes.size <= 1  ";
463
            queryStr += " AND t.sec IS NULL ";
467 464
        }
465
        return setSecundum(newSec, emptyDetail, queryStr);
466

  
467
    }
468

  
469
    @Override
470
    public Set<Synonym> setSecundumForSubtreeSynonyms(TreeIndex subTreeIndex, Reference newSec, boolean overwriteExisting, boolean includeSharedTaxa, boolean emptyDetail) {
468 471

  
469
        where = String.format(where, subTreeIndex.toString());
470
        Query query1 = getSession().createQuery(where);
472
        String queryStr = synonymForSubtreeQueryStr(includeSharedTaxa, subTreeIndex);
473
        if (!overwriteExisting){
474
            queryStr += " AND syn.sec IS NULL ";
475
        }
476
        return setSecundum(newSec, emptyDetail, queryStr);
477
    }
478
    /**
479
     * @param newSec
480
     * @param emptyDetail
481
     * @param queryStr
482
     * @return
483
     */
484
    private <T extends TaxonBase<?>> Set<T> setSecundum(Reference newSec, boolean emptyDetail, String queryStr) {
485
        Query query = getSession().createQuery(queryStr);
471 486
        @SuppressWarnings("unchecked")
472
        List<Taxon> taxonList = query1.list();
473
        for (Taxon taxon : taxonList){
474
            taxon.setSec(newSec);
487
        List<T> synonymList = query.list();
488
        for (T taxonBase : synonymList){
489
            taxonBase.setSec(newSec);
475 490
            if (emptyDetail){
476
                taxon.setSecMicroReference(null);
491
                taxonBase.setSecMicroReference(null);
477 492
            }
478 493
        }
479

  
480
        Set<Taxon> result = new HashSet<>(taxonList);
494
        Set<T> result = new HashSet<>(synonymList);
481 495
        return result;
496
    }
497

  
482 498

  
499
    /**
500
     * {@inheritDoc}
501
     */
502
    @Override
503
    public Set<Taxon> setPublishForSubtreeAcceptedTaxa(TreeIndex subTreeIndex, boolean publish,
504
            boolean includeSharedTaxa) {
505
        String queryStr = acceptedForSubtreeQueryStr(includeSharedTaxa, subTreeIndex);
506
        return setPublish(publish, queryStr);
483 507
    }
484 508

  
509
    /**
510
     * {@inheritDoc}
511
     */
485 512
    @Override
486
    public Set<Synonym> setSecundumForSubtreeSynonyms(TreeIndex subTreeIndex, Reference newSec, boolean overwriteExisting, boolean includeSharedTaxa, boolean emptyDetail) {
487
        String where = "SELECT syn FROM TaxonNode tn JOIN tn.taxon t JOIN t.synonyms syn" +
488
                " WHERE tn.treeIndex like '%s%%' ";
489
        if (!overwriteExisting){
490
            where += " AND syn.sec IS NULL ";
491
        }
492
        if (!includeSharedTaxa){
493
            where += " AND t.taxonNodes.size <= 1  ";
494
        }
495
        where = String.format(where, subTreeIndex.toString());
496
        Query query1 = getSession().createQuery(where);
513
    public Set<Synonym> setPublishForSubtreeSynonyms(TreeIndex subTreeIndex, boolean publish,
514
            boolean includeSharedTaxa) {
515
        String queryStr = synonymForSubtreeQueryStr(includeSharedTaxa, subTreeIndex);
516
        return setPublish(publish, queryStr);
517
    }
518

  
519
    /**
520
     * @param publish
521
     * @param queryStr
522
     * @return
523
     */
524
    private <T extends TaxonBase<?>> Set<T> setPublish(boolean publish, String queryStr) {
525
        Query query = getSession().createQuery(queryStr);
497 526
        @SuppressWarnings("unchecked")
498
        List<Synonym> synonymList = query1.list();
499
        for (Synonym taxon : synonymList){
500
            taxon.setSec(newSec);
501
            if (emptyDetail){
502
                taxon.setSecMicroReference(null);
503
            }
527
        List<T> taxonList = query.list();
528
        for (T taxon : taxonList){
529
            taxon.setPublish(publish);
504 530
        }
505
        Set<Synonym> result = new HashSet<>(synonymList);
531

  
532
        Set<T> result = new HashSet<>(taxonList);
506 533
        return result;
507 534
    }
508 535

  
509 536

  
537
    /**
538
     * @param includeSharedTaxa
539
     * @param subTreeIndex
540
     * @return
541
     */
542
    private String synonymForSubtreeQueryStr(boolean includeSharedTaxa, TreeIndex subTreeIndex) {
543
        String queryStr = "SELECT syn "
544
                + " FROM TaxonNode tn JOIN tn.taxon t JOIN t.synonyms syn"
545
                + " WHERE tn.treeIndex like '%s%%' ";
546
        if (!includeSharedTaxa){
547
            queryStr += " AND t.taxonNodes.size <= 1  ";
548
        }
549
        queryStr = String.format(queryStr, subTreeIndex.toString());
550

  
551
        return queryStr;
552
    }
553

  
554
    private String acceptedForSubtreeQueryStr(boolean includeSharedTaxa, TreeIndex subTreeIndex) {
555
        String queryStr = "SELECT t "
556
                + " FROM TaxonNode tn JOIN tn.taxon t "
557
                + " WHERE tn.treeIndex like '%s%%' ";
558
        if (!includeSharedTaxa){
559
            queryStr += " AND t.taxonNodes.size <= 1  ";
560
        }
561
        queryStr = String.format(queryStr, subTreeIndex.toString());
562

  
563
        return queryStr;
564
    }
565

  
510 566

  
511 567
}
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/taxon/ITaxonNodeDao.java
136 136
     */
137 137
    public  Set<Synonym> setSecundumForSubtreeSynonyms(TreeIndex subTreeIndex, Reference newSec, boolean overwriteExisting, boolean includeSharedTaxa, boolean emptyDetail);
138 138

  
139
    /**
140
     * @param subTreeIndex
141
     * @param publish
142
     * @param includeSharedTaxa
143
     * @return
144
     */
145
    public Set<Taxon> setPublishForSubtreeAcceptedTaxa(TreeIndex subTreeIndex, boolean publish, boolean includeSharedTaxa);
146

  
147
    /**
148
     * @param subTreeIndex
149
     * @param publish
150
     * @param includeSharedTaxa
151
     * @return
152
     */
153
    public Set<Synonym> setPublishForSubtreeSynonyms(TreeIndex subTreeIndex, boolean publish,
154
            boolean includeSharedTaxa);
155

  
139 156
}
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/ITaxonNodeService.java
253 253
     */
254 254
    public UpdateResult setSecundumForSubtree(UUID subtreeUuid,  Reference newSec, boolean includeAcceptedTaxa, boolean includeSynonyms, boolean overwriteExistingAccepted, boolean overwriteExistingSynonyms, boolean includeSharedTaxa, boolean emptyDetail, IProgressMonitor monitor);
255 255

  
256

  
257
    /**
258
     * Sets the publish flag for all taxa and/or synonyms of the subtree.
259
     * @param subtreeUuid
260
     * @param publish
261
     * @param includeAcceptedTaxa
262
     * @param includeSynonyms
263
     * @param overwriteExistingAccepted
264
     * @param overwriteExistingSynonyms
265
     * @param includeSharedTaxa
266
     * @param progressMonitor
267
     * @return
268
     */
269
    public UpdateResult setPublishForSubtree(UUID subtreeUuid, boolean publish, boolean includeAcceptedTaxa,
270
            boolean includeSynonyms, boolean includeSharedTaxa, IProgressMonitor progressMonitor);
271

  
272

  
256 273
    /**
257 274
     * Returns a list of taxon node {@link UUID uuids} according to the given filter.
258 275
     * @param filter
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/TaxonNodeServiceImpl.java
748 748

  
749 749
    @Override
750 750
    @Transactional
751
    public UpdateResult setSecundumForSubtree(UUID subtreeUuid,  Reference newSec, boolean includeAcceptedTaxa, boolean includeSynonyms, boolean overwriteExistingAccepted, boolean overwriteExistingSynonyms, boolean includeSharedTaxa, boolean emptyDetail, IProgressMonitor monitor) {
751
    public UpdateResult setSecundumForSubtree(UUID subtreeUuid,  Reference newSec,
752
            boolean includeAcceptedTaxa, boolean includeSynonyms,
753
            boolean overwriteExistingAccepted, boolean overwriteExistingSynonyms,
754
            boolean includeSharedTaxa, boolean emptyDetail, IProgressMonitor monitor) {
752 755
        UpdateResult result = new UpdateResult();
753 756
       // IProgressMonitor monitor = config.getMonitor();
754 757
        if (monitor == null){
......
786 789
    }
787 790

  
788 791

  
792
    /**
793
     * {@inheritDoc}
794
     */
795
    @Override
796
    public UpdateResult setPublishForSubtree(UUID subtreeUuid, boolean publish, boolean includeAcceptedTaxa,
797
            boolean includeSynonyms, boolean includeSharedTaxa, IProgressMonitor monitor) {
798
        UpdateResult result = new UpdateResult();
799
       // IProgressMonitor monitor = config.getMonitor();
800
        if (monitor == null){
801
            monitor = DefaultProgressMonitor.NewInstance();
802
        }
803
        monitor.beginTask("Update publish flag", 100);
804
        if (subtreeUuid == null){
805
            result.setError();
806
            result.addException(new NullPointerException("No subtree given"));
807
            monitor.done();
808
            return result;
809
        }
810
        TaxonNode subTree = find(subtreeUuid);
811
        if (subTree == null){
812
            result.setError();
813
            result.addException(new NullPointerException("Subtree does not exist"));
814
            monitor.done();
815
            return result;
816
        }
817
        TreeIndex subTreeIndex = TreeIndex.NewInstance(subTree.treeIndex());
818

  
819
        //Reference ref = config.getNewSecundum();
820
        if (includeAcceptedTaxa){
821
            monitor.subTask("Update Accepted Taxa");
822
            Set<Taxon> updatedTaxa = dao.setPublishForSubtreeAcceptedTaxa(subTreeIndex, publish, includeSharedTaxa);
823
            result.addUpdatedObjects(updatedTaxa);
824
        }
825
        if (includeSynonyms){
826
            monitor.subTask("Update Synonyms");
827
            Set<Synonym> updatedSynonyms = dao.setPublishForSubtreeSynonyms(subTreeIndex, publish, includeSharedTaxa);
828
            result.addUpdatedObjects(updatedSynonyms);
829
        }
830
        monitor.done();
831
        return result;
832
    }
833

  
834

  
789 835
    @Override
790 836
    public long count(TaxonNodeFilter filter){
791 837
        return nodeFilterDao.count(filter);
......
801 847
        return nodeFilterDao.idList(filter);
802 848
    }
803 849

  
850

  
804 851
}
cdmlib-services/src/test/java/eu/etaxonomy/cdm/api/service/TaxonNodeServiceImplTest.java
872 872
        Assert.assertNull(taxon5.getSecMicroReference());
873 873
    }
874 874

  
875
    @Test
876
    @DataSet("TaxonNodeServiceImplTest.testSetSecundumForSubtree.xml")
877
    public void testSetPublishForSubtree(){
878
        UUID subTreeUuid = UUID.fromString("484a1a77-689c-44be-8e65-347d835f47e8");
879

  
880
        //assert current state
881
        Assert.assertTrue(taxonService.find(1).isPublish());
882
        Assert.assertTrue(taxonService.find(2).isPublish());
883
        Assert.assertTrue(taxonService.find(3).isPublish());
884
        Assert.assertTrue(taxonService.find(4).isPublish());
885
        Assert.assertTrue(taxonService.find(5).isPublish());
886

  
887
        //set publish
888
//        SetSecundumForSubtreeConfigurator config = new SetPublishForSubtreeConfigurator(subTreeUuid);
889
//        config.setNewSecundum(newSec);
890
        boolean publish = false;
891
        taxonNodeService.setPublishForSubtree(subTreeUuid,  publish, true, true, true, null);
892

  
893
        commitAndStartNewTransaction(new String[]{});
894
        Assert.assertEquals(publish, taxonService.find(1).isPublish());
895
        Assert.assertEquals(true, taxonService.find(2).isPublish());
896
        Assert.assertEquals(publish, taxonService.find(3).isPublish());
897
        Assert.assertEquals(true, taxonService.find(4).isPublish());
898
        Assert.assertEquals(publish, taxonService.find(5).isPublish());
899
    }
900

  
901
    @Test
902
    @DataSet("TaxonNodeServiceImplTest.testSetSecundumForSubtree.xml")
903
    public void testSetPublishForSubtreeOnlyAccepted(){
904
        UUID subTreeUuid = UUID.fromString("484a1a77-689c-44be-8e65-347d835f47e8");
905

  
906
        //assert current state
907
        Assert.assertTrue(taxonService.find(1).isPublish());
908
        Assert.assertTrue(taxonService.find(2).isPublish());
909
        Assert.assertTrue(taxonService.find(3).isPublish());
910
        Assert.assertTrue(taxonService.find(4).isPublish());
911
        Assert.assertTrue(taxonService.find(5).isPublish());
912

  
913
        //set secundum
914
//        SetSecundumForSubtreeConfigurator config = new SetPublishForSubtreeConfigurator(subTreeUuid, newSec, null);
915
//        config.setIncludeSynonyms(false);
916
        boolean publish = false;
917
        taxonNodeService.setPublishForSubtree(subTreeUuid,  publish, true, false, true, null);
918

  
919
        commitAndStartNewTransaction();
920
        Assert.assertEquals(publish, taxonService.find(1).isPublish());
921
        Assert.assertEquals(true, taxonService.find(2).isPublish());
922
        Assert.assertEquals(true, taxonService.find(3).isPublish());
923
        Assert.assertEquals(true, taxonService.find(4).isPublish());
924
        Assert.assertEquals(publish, taxonService.find(5).isPublish());
925
    }
926

  
927
    @Test
928
    @DataSet("TaxonNodeServiceImplTest.testSetSecundumForSubtree.xml")
929
    public void testSetPublishForSubtreeOnlySynonyms(){
930
        UUID subTreeUuid = UUID.fromString("484a1a77-689c-44be-8e65-347d835f47e8");
931

  
932
        //assert current state
933
        Assert.assertTrue(taxonService.find(1).isPublish());
934
        Assert.assertTrue(taxonService.find(2).isPublish());
935
        Assert.assertTrue(taxonService.find(3).isPublish());
936
        Assert.assertTrue(taxonService.find(4).isPublish());
937
        Assert.assertTrue(taxonService.find(5).isPublish());
938

  
939
        //set secundum
940
//        SetSecundumForSubtreeConfigurator config = new SetPublishForSubtreeConfigurator(subTreeUuid, newSec, null);
941
//        config.setIncludeAcceptedTaxa(false);
942
        boolean publish = false;
943
        taxonNodeService.setPublishForSubtree(subTreeUuid,  publish, false, true, true, null);
944

  
945
        commitAndStartNewTransaction(new String[]{});
946
        Assert.assertEquals(true, taxonService.find(1).isPublish());
947
        Assert.assertEquals(true, taxonService.find(2).isPublish());
948
        Assert.assertEquals(publish, taxonService.find(3).isPublish());
949
        Assert.assertEquals(true, taxonService.find(4).isPublish());
950
        Assert.assertEquals(true, taxonService.find(5).isPublish());
951
    }
952

  
953

  
954
    @Test
955
    @DataSet("TaxonNodeServiceImplTest.testSetSecundumForSubtree.xml")
956
    public void testSetPublishForSubtreeNoShared(){
957
        UUID subTreeUuid = UUID.fromString("484a1a77-689c-44be-8e65-347d835f47e8");
958

  
959
        //assert current state
960
        Assert.assertTrue(taxonService.find(1).isPublish());
961
        Assert.assertTrue(taxonService.find(2).isPublish());
962
        Assert.assertTrue(taxonService.find(3).isPublish());
963
        Assert.assertTrue(taxonService.find(4).isPublish());
964
        Assert.assertTrue(taxonService.find(5).isPublish());
965

  
966
        //set secundum
967
     //   SetSecundumForSubtreeConfigurator config = new SetPublishForSubtreeConfigurator(subTreeUuid, newSec, null);
968
   //     config.setIncludeSharedTaxa(false);
969
        boolean publish = false;
970
        taxonNodeService.setPublishForSubtree(subTreeUuid, publish, true, true, false, null);
971

  
972
        commitAndStartNewTransaction(new String[]{});
973
        Assert.assertEquals("Shared taxon must not be set", true, taxonService.find(1).isPublish());
974
        Assert.assertEquals(true, taxonService.find(2).isPublish());
975
        Assert.assertEquals("Synonym of shared taxon must not be set", true, taxonService.find(3).isPublish());
976
        Assert.assertEquals(true, taxonService.find(4).isPublish());
977
        Assert.assertEquals(publish, taxonService.find(5).isPublish());
978
    }
979

  
875 980

  
876 981
    @Override
877 982
//    @Test

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)