Created
October 2, 2014 04:40
-
-
Save theresajayne/b21d9c7e273f956e9c33 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| import org.junit.Before; | |
| import org.junit.Test; | |
| import static org.hamcrest.MatcherAssert.assertThat; | |
| import static org.hamcrest.Matchers.is; | |
| /** | |
| * Created by Theresa on 02/10/2014. | |
| */ | |
| public class ValidInputTest { | |
| private ValidInput validInput; | |
| @Before | |
| public void setUp() | |
| { | |
| validInput = new ValidInput(); | |
| } | |
| @Test | |
| public void testNegative() | |
| { | |
| assertThat(validInput.isValidInput(-1),is(false)); | |
| } | |
| @Test | |
| public void testPositive() | |
| { | |
| assertThat(validInput.isValidInput(101),is(false)); | |
| } | |
| @Test | |
| public void testMiddle() | |
| { | |
| assertThat(validInput.isValidInput(50),is(true)); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment