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 ScmTest
30 extends TestCase
31 {
32
33 public void testHashCodeNullSafe()
34 {
35 new Scm().hashCode();
36 }
37
38 public void testEqualsNullSafe()
39 {
40 assertFalse( new Scm().equals( null ) );
41
42 new Scm().equals( new Scm() );
43 }
44
45 public void testEqualsIdentity()
46 {
47 Scm thing = new Scm();
48 assertTrue( thing.equals( thing ) );
49 }
50
51 public void testToStringNullSafe()
52 {
53 assertNotNull( new Scm().toString() );
54 }
55
56 public void testToStringNotNonsense()
57 {
58 Scm scm = new Scm();
59 scm.setConnection( "scm:git:git://git.localdomain/model" );
60
61 String s = scm.toString();
62
63 assertEquals( "Scm {connection=scm:git:git://git.localdomain/model}", s );
64 }
65 }