Project

General

Profile

Revision e0af1680

IDe0af1680c48a2e9f006210ea3efe30ff17c640cd
Parent ced4a690
Child d7fa3e13

Added by Andreas Müller almost 3 years ago

fix clone test for Media

View differences:

cdmlib-model/src/test/java/eu/etaxonomy/cdm/model/media/MediaTest.java
29 29
/**
30 30
 * @author a.mueller
31 31
 * @created 05.08.2009
32
 * @version 1.0
33 32
 */
34 33
public class MediaTest {
35 34
    @SuppressWarnings("unused")
......
126 125
            Media mediaClone = (Media)media1.clone();
127 126
            Assert.assertSame("Artist must be the same", team1, mediaClone.getArtist());
128 127
            Assert.assertTrue("Clone must have a default language description", mediaClone.getAllDescriptions().containsKey(Language.DEFAULT()));
129
            Assert.assertSame("Description1 must be the same", languageString1, mediaClone.getAllDescriptions().get(Language.DEFAULT()) );
128
            Assert.assertEquals("Description1.text must be the equal", languageString1.getText(), mediaClone.getAllDescriptions().get(Language.DEFAULT()).getText() );
129
            Assert.assertSame("Description1.language must be the same", languageString1.getLanguage(), mediaClone.getAllDescriptions().get(Language.DEFAULT()).getLanguage() );
130 130
            Assert.assertTrue("Clone must have a german description", mediaClone.getAllDescriptions().containsKey(Language.GERMAN()));
131 131
            Assert.assertEquals("German description must equal media1Desc2", germanDescription, mediaClone.getAllDescriptions().get(Language.GERMAN()).getText() );
132 132

  
......
141 141
            Assert.assertFalse("Rights must be coloned", mediaClone.getRights().iterator().next().equals(rights1));
142 142

  
143 143
            Assert.assertTrue("Clone must have a default language title", mediaClone.getAllTitles().containsKey(Language.DEFAULT()));
144
            Assert.assertSame("Title must be the same", languageString2, mediaClone.getAllTitles().get(Language.DEFAULT()) );
144
            Assert.assertSame("Title.language must be the same", languageString2.getLanguage(), mediaClone.getAllTitles().get(Language.DEFAULT()).getLanguage() );
145
            Assert.assertEquals("Title.text must be equal", languageString2.getText(), mediaClone.getAllTitles().get(Language.DEFAULT()).getText() );
145 146

  
146 147
        } catch (CloneNotSupportedException e) {
147 148
            Assert.fail("Media must be cloneable");

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)