Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package testen;
- import domein.Palindroom;
- import java.util.Arrays;
- import java.util.Collection;
- import junit.framework.Assert;
- import org.junit.Before;
- import org.junit.Test;
- import org.junit.runner.RunWith;
- import org.junit.runners.Parameterized;
- /**
- *
- * @author Cedric
- */
- @RunWith(Parameterized.class)
- public class PalindroomTest {
- private String input;
- private Palindroom palindroom;
- public PalindroomTest(String input) {
- this.input = input;
- }
- @Parameterized.Parameters
- public static Collection<String[]> data() {
- return Arrays.asList(new String[][] {
- {"dood"},{"1000000000001"}
- });
- }
- @Before
- public void before(){
- this.palindroom = new Palindroom(input);
- }
- @Test
- public void isGeldigePalindroomTest(){
- Assert.assertEquals(palindroom.isPalindroom(input), true);
- }
- @Test
- public void isOngelidigePalindroomTest(){
- Assert.assertEquals(palindroom.isPalindroom(input), false);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement