Added tests to FilenameGenerator
This commit is contained in:
parent
162aa9afcf
commit
f4fa334abf
|
@ -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);
|
||||
|
@ -23,6 +24,12 @@ public class FilenameGeneratorTest extends AndroidTestCase {
|
|||
createFiles(result);
|
||||
}
|
||||
|
||||
public void testGenerateFileName2() throws IOException {
|
||||
String result = FileNameGenerator.generateFileName(INVALID2);
|
||||
assertEquals(result, VALID1);
|
||||
createFiles(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests if files can be created.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue