Project

General

Profile

Revision 11012a24

ID11012a2493015ffd8d419300a34a2ec4118ead86
Parent 6321fa37
Child 67118ad4

Added by Andreas Kohlbecker almost 3 years ago

ref #7995 adapting test to use updateStatusAndDate

View differences:

cdmlib-model/src/test/java/eu/etaxonomy/cdm/model/name/RegistrationTest.java
80 80
     * see https://dev.e-taxonomy.eu/redmine/issues/7995
81 81
     */
82 82
    @Test
83
    public void testSetStatus() {
83
    public void testUpdateStatusAndDate() {
84 84
        Registration registration = Registration.NewInstance();
85 85

  
86 86
        registration.setStatus(RegistrationStatus.CURATION);
87 87
        assertNull(registration.getRegistrationDate());
88 88

  
89 89
        DateTime before = DateTime.now();
90
        registration.setStatus(RegistrationStatus.PUBLISHED);
90
        registration.updateStatusAndDate(RegistrationStatus.PUBLISHED);
91 91
        assertNotNull(registration.getRegistrationDate());
92 92
        assertTrue(registration.getRegistrationDate().isAfter(registration.getRegistrationDate()) || registration.getRegistrationDate().isEqual(before) );
93 93
        assertTrue(registration.getRegistrationDate().isBeforeNow() || registration.getRegistrationDate().isEqual(before));
94 94

  
95
        registration.setStatus(RegistrationStatus.CURATION);
95
        registration.updateStatusAndDate(RegistrationStatus.CURATION);
96 96
        assertNull(registration.getRegistrationDate());
97 97
    }
98 98

  

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)