Created
April 24, 2013 20:11
-
-
Save Slesa/5455169 to your computer and use it in GitHub Desktop.
Guess my favorite testing framework...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package specs; | |
import static org.junit.Assert.*; | |
import org.junit.Before; | |
import org.junit.Test; | |
import dlist.DList; | |
import dlist.DPosition; | |
public class When_appending_element { | |
private DList<Integer> Subject; | |
public When_appending_element() { | |
Subject = new DList<Integer>(); | |
} | |
@Before | |
public void Because_of() { | |
Subject.append(42); | |
} | |
@Test | |
public void It_should_return_the_element_as_head() { | |
DPosition<Integer> element = Subject.getHead(); | |
assertEquals(element.getValue().intValue(), 42); | |
} | |
@Test | |
public void It_should_return_the_element_as_tail() { | |
DPosition<Integer> element = Subject.getTail(); | |
assertEquals(element.getValue().intValue(), 42); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment