Advertisement
Guest User

Untitled

a guest
Oct 5th, 2015
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. package testen;
  2.  
  3. import domein.Palindroom;
  4. import java.util.Arrays;
  5. import java.util.Collection;
  6. import junit.framework.Assert;
  7. import org.junit.Before;
  8. import org.junit.Test;
  9. import org.junit.runner.RunWith;
  10. import org.junit.runners.Parameterized;
  11.  
  12. /**
  13. *
  14. * @author Cedric
  15. */
  16. @RunWith(Parameterized.class)
  17. public class PalindroomTest {
  18.  
  19. private String input;
  20. private Palindroom palindroom;
  21.  
  22.  
  23. public PalindroomTest(String input) {
  24. this.input = input;
  25. }
  26.  
  27. @Parameterized.Parameters
  28. public static Collection<String[]> data() {
  29.  
  30. return Arrays.asList(new String[][] {
  31. {"dood"},{"1000000000001"}
  32. });
  33. }
  34.  
  35.  
  36. @Before
  37. public void before(){
  38. this.palindroom = new Palindroom(input);
  39. }
  40.  
  41. @Test
  42. public void isGeldigePalindroomTest(){
  43. Assert.assertEquals(palindroom.isPalindroom(input), true);
  44. }
  45.  
  46. @Test
  47. public void isOngelidigePalindroomTest(){
  48. Assert.assertEquals(palindroom.isPalindroom(input), false);
  49. }
  50.  
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement