1717
1818package pl .project13 .maven .git ;
1919
20- import static org .junit .Assert .assertThat ;
21-
2220import java .io .File ;
2321
2422import org .eclipse .jgit .api .Git ;
2523import org .eclipse .jgit .lib .ConfigConstants ;
2624import org .eclipse .jgit .lib .StoredConfig ;
27- import org .hamcrest .CoreMatchers ;
2825import org .junit .After ;
2926import org .junit .Before ;
3027import org .junit .Rule ;
3330import pl .project13 .core .AheadBehind ;
3431import pl .project13 .core .GitProvider ;
3532
33+ import static org .junit .Assert .assertEquals ;
34+
3635public abstract class AheadBehindTest <T extends GitProvider > {
3736
3837 @ Rule
@@ -87,8 +86,8 @@ protected void extraSetup() {
8786 public void shouldNotBeAheadOrBehind () throws Exception {
8887
8988 AheadBehind aheadBehind = gitProvider .getAheadBehind ();
90- assertThat (aheadBehind .ahead (), CoreMatchers . is ( "0" ) );
91- assertThat (aheadBehind .behind (), CoreMatchers . is ( "0" ) );
89+ assertEquals (aheadBehind .ahead (), "0" );
90+ assertEquals (aheadBehind .behind (), "0" );
9291 }
9392
9493 @ Test
@@ -97,8 +96,8 @@ public void shouldBe1Ahead() throws Exception {
9796 createLocalCommit ();
9897
9998 AheadBehind aheadBehind = gitProvider .getAheadBehind ();
100- assertThat (aheadBehind .ahead (), CoreMatchers . is ( "1" ) );
101- assertThat (aheadBehind .behind (), CoreMatchers . is ( "0" ) );
99+ assertEquals (aheadBehind .ahead (),"1" );
100+ assertEquals (aheadBehind .behind (),"0" );
102101 }
103102
104103 @ Test
@@ -107,8 +106,8 @@ public void shouldBe1Behind() throws Exception {
107106 createCommitInSecondRepoAndPush ();
108107
109108 AheadBehind aheadBehind = gitProvider .getAheadBehind ();
110- assertThat (aheadBehind .ahead (), CoreMatchers . is ( "0" ) );
111- assertThat (aheadBehind .behind (), CoreMatchers . is ( "1" ) );
109+ assertEquals (aheadBehind .ahead (),"0" );
110+ assertEquals (aheadBehind .behind (),"1" );
112111 }
113112
114113 @ Test
@@ -118,8 +117,8 @@ public void shouldBe1AheadAnd1Behind() throws Exception {
118117 createCommitInSecondRepoAndPush ();
119118
120119 AheadBehind aheadBehind = gitProvider .getAheadBehind ();
121- assertThat (aheadBehind .ahead (), CoreMatchers . is ( "1" ) );
122- assertThat (aheadBehind .behind (), CoreMatchers . is ( "1" ) );
120+ assertEquals (aheadBehind .ahead (),"1" );
121+ assertEquals (aheadBehind .behind (),"1" );
123122 }
124123
125124 protected void createLocalCommit () throws Exception {
0 commit comments