lots of exercises in java... from https://github.com/exercism/java

IncorrectKeyCipherTest.java 821B

123456789101112131415161718192021222324252627282930313233343536
  1. import org.junit.Test;
  2. import org.junit.Ignore;
  3. public class IncorrectKeyCipherTest {
  4. @Test(expected = IllegalArgumentException.class)
  5. public void cipherThrowsWithAllCapsKey() {
  6. new Cipher("ABCDEF");
  7. }
  8. @Ignore
  9. @Test(expected = IllegalArgumentException.class)
  10. public void cipherThrowsWithAnyCapsKey() {
  11. new Cipher("abcdEFg");
  12. }
  13. @Ignore
  14. @Test(expected = IllegalArgumentException.class)
  15. public void cipherThrowsWithNumericKey() {
  16. new Cipher("12345");
  17. }
  18. @Ignore
  19. @Test(expected = IllegalArgumentException.class)
  20. public void cipherThrowsWithAnyNumericKey() {
  21. new Cipher("abcd345ef");
  22. }
  23. @Ignore
  24. @Test(expected = IllegalArgumentException.class)
  25. public void cipherThrowsWithEmptyKey() {
  26. new Cipher("");
  27. }
  28. }