Skip to content

Commit

Permalink
Issue exercism#196: Replaced assertj assertions with junit and hamcre…
Browse files Browse the repository at this point in the history
…st assertions in linked-list. Removed assertj from linked-list gradle build file.
  • Loading branch information
FridaTveit committed Dec 16, 2016
1 parent 4ef21e1 commit 7e3e505
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
1 change: 0 additions & 1 deletion exercises/linked-list/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ repositories {

dependencies {
testCompile "junit:junit:4.12"
testCompile "org.assertj:assertj-core:3.2.0"
}
test {
testLogging {
Expand Down
31 changes: 16 additions & 15 deletions exercises/linked-list/src/test/java/DequeTest.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import org.junit.Before;
import org.junit.Test;
import org.junit.Ignore;
import org.junit.Test;

import static org.assertj.core.api.Assertions.assertThat;
import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.*;

public class DequeTest {
private Deque<Integer> subject;
Expand All @@ -17,51 +18,51 @@ public void setUp() {
public void testPushPop() {
subject.push(10);
subject.push(20);
assertThat(subject.pop()).isEqualTo(20);
assertThat(subject.pop()).isEqualTo(10);
assertThat(subject.pop(), is(20));
assertThat(subject.pop(), is(10));
}

@Ignore
@Test
public void testPushShift() {
subject.push(10);
subject.push(20);
assertThat(subject.shift()).isEqualTo(10);
assertThat(subject.shift()).isEqualTo(20);
assertThat(subject.shift(), is(10));
assertThat(subject.shift(), is(20));
}

@Ignore
@Test
public void testUnshiftShift() {
subject.unshift(10);
subject.unshift(20);
assertThat(subject.shift()).isEqualTo(20);
assertThat(subject.shift()).isEqualTo(10);
assertThat(subject.shift(), is(20));
assertThat(subject.shift(), is(10));
}

@Ignore
@Test
public void testUnshiftPop() {
subject.unshift(10);
subject.unshift(20);
assertThat(subject.pop()).isEqualTo(10);
assertThat(subject.pop()).isEqualTo(20);
assertThat(subject.pop(), is(10));
assertThat(subject.pop(), is(20));
}

@Ignore
@Test
public void testExample() {
subject.push(10);
subject.push(20);
assertThat(subject.pop()).isEqualTo(20);
assertThat(subject.pop(), is(20));

subject.push(30);
assertThat(subject.shift()).isEqualTo(10);
assertThat(subject.shift(), is(10));

subject.unshift(40);
subject.push(50);
assertThat(subject.shift()).isEqualTo(40);
assertThat(subject.pop()).isEqualTo(50);
assertThat(subject.shift()).isEqualTo(30);
assertThat(subject.shift(), is(40));
assertThat(subject.pop(), is(50));
assertThat(subject.shift(), is(30));
}
}

0 comments on commit 7e3e505

Please sign in to comment.