1 package org.apache.maven.model;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import junit.framework.TestCase;
23
24
25
26
27
28
29 public class MailingListTest
30 extends TestCase
31 {
32
33 public void testHashCodeNullSafe()
34 {
35 new MailingList().hashCode();
36 }
37
38 public void testEqualsNullSafe()
39 {
40 assertFalse( new MailingList().equals( null ) );
41
42 new MailingList().equals( new MailingList() );
43 }
44
45 public void testEqualsIdentity()
46 {
47 MailingList thing = new MailingList();
48 assertTrue( thing.equals( thing ) );
49 }
50
51 public void testToStringNullSafe()
52 {
53 assertNotNull( new MailingList().toString() );
54 }
55
56 public void testToStringNotNonsense()
57 {
58 MailingList list = new MailingList();
59 list.setName( "modello-dev" );
60
61 String s = list.toString();
62
63 assertEquals( "MailingList {name=modello-dev, archive=null}", s );
64 }
65 }