Replace assertTrue(false) with fail() everywhere
@@ -14,6 +14,7 @@ import java.io.File;
import org.junit.Test;
import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@@ -30,7 +31,7 @@ public class FileUtilsTest {
try {
FileUtils.mkdirs(directory);
} catch (FileUtils.CreateDirectoryException cde) {
- assertTrue(false);
+ fail();
}
}
@@ -43,7 +44,7 @@ public class FileUtilsTest {
try {
FileUtils.mkdirs(directory);
} catch (FileUtils.CreateDirectoryException cde) {
- assertTrue(false);
+ fail();
}
}
@@ -55,7 +56,7 @@ public class FileUtilsTest {
when(directory.delete()).thenReturn(false);
try {
FileUtils.mkdirs(directory);
- assertTrue(false);
+ fail();
} catch (FileUtils.CreateDirectoryException cde) {
assertTrue(cde.getCause() instanceof FileUtils.FileDeleteException);
}
@@ -71,7 +72,7 @@ public class FileUtilsTest {
try {
FileUtils.rename(sourceFile, targetFile);
} catch (FileUtils.RenameException re) {
- assertTrue(false);
+ fail();
}
}
@@ -87,7 +88,7 @@ public class FileUtilsTest {
try {
FileUtils.rename(sourceFile, targetFile);
- assertTrue(false);
+ fail();
} catch (FileUtils.RenameException re) {
assertTrue(re.getCause() instanceof FileUtils.ParentDirNotFoundException);
}
