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 DeveloperTest
30 extends TestCase
31 {
32
33 public void testHashCodeNullSafe()
34 {
35 new Developer().hashCode();
36 }
37
38 public void testEqualsNullSafe()
39 {
40 assertFalse( new Developer().equals( null ) );
41
42 new Developer().equals( new Developer() );
43 }
44
45 public void testEqualsIdentity()
46 {
47 Developer thing = new Developer();
48 assertTrue( thing.equals( thing ) );
49 }
50
51 public void testToStringNullSafe()
52 {
53 assertNotNull( new Developer().toString() );
54 }
55
56 public void testToStringNotNonsense()
57 {
58 Developer dev = new Developer();
59 dev.setName( "Maven Tester" );
60 dev.setEmail( "tester@acme.localdomain" );
61 dev.setId( "20220118" );
62
63 String s = dev.toString();
64
65 assert "Developer {id=20220118, Contributor {name=Maven Tester, email=tester@acme.localdomain}}".equals( s ) : s;
66 }
67 }