diff options
author | daniel oeh <daniel.oeh@gmail.com> | 2013-03-25 11:05:53 +0100 |
---|---|---|
committer | daniel oeh <daniel.oeh@gmail.com> | 2013-03-25 11:05:53 +0100 |
commit | f4fa334abf6f2c904a50ca50c39b86efb76969fa (patch) | |
tree | db0567713316e07bf36f252909cf2f8c7be7b85c | |
parent | 162aa9afcfd629e90b84ecfe4d6287c7c671958a (diff) | |
download | AntennaPod-f4fa334abf6f2c904a50ca50c39b86efb76969fa.zip |
Added tests to FilenameGenerator
-rw-r--r-- | tests/src/de/danoeh/antennapod/test/FilenameGeneratorTest.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/src/de/danoeh/antennapod/test/FilenameGeneratorTest.java b/tests/src/de/danoeh/antennapod/test/FilenameGeneratorTest.java index 90b1224a7..5e46b6748 100644 --- a/tests/src/de/danoeh/antennapod/test/FilenameGeneratorTest.java +++ b/tests/src/de/danoeh/antennapod/test/FilenameGeneratorTest.java @@ -10,6 +10,7 @@ public class FilenameGeneratorTest extends AndroidTestCase { private static final String VALID1 = "abc abc"; private static final String INVALID1 = "ab/c: <abc"; + private static final String INVALID2 = "abc abc "; public void testGenerateFileName() throws IOException { String result = FileNameGenerator.generateFileName(VALID1); @@ -22,6 +23,12 @@ public class FilenameGeneratorTest extends AndroidTestCase { assertEquals(result, VALID1); createFiles(result); } + + public void testGenerateFileName2() throws IOException { + String result = FileNameGenerator.generateFileName(INVALID2); + assertEquals(result, VALID1); + createFiles(result); + } /** * Tests if files can be created. |