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 VALID1 = "abc abc";
|
||||||
private static final String INVALID1 = "ab/c: <abc";
|
private static final String INVALID1 = "ab/c: <abc";
|
||||||
|
private static final String INVALID2 = "abc abc ";
|
||||||
|
|
||||||
public void testGenerateFileName() throws IOException {
|
public void testGenerateFileName() throws IOException {
|
||||||
String result = FileNameGenerator.generateFileName(VALID1);
|
String result = FileNameGenerator.generateFileName(VALID1);
|
||||||
|
@ -22,6 +23,12 @@ public class FilenameGeneratorTest extends AndroidTestCase {
|
||||||
assertEquals(result, VALID1);
|
assertEquals(result, VALID1);
|
||||||
createFiles(result);
|
createFiles(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testGenerateFileName2() throws IOException {
|
||||||
|
String result = FileNameGenerator.generateFileName(INVALID2);
|
||||||
|
assertEquals(result, VALID1);
|
||||||
|
createFiles(result);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests if files can be created.
|
* Tests if files can be created.
|
||||||
|
|
Loading…
Reference in New Issue