diff options
author | Selvasundaram <selvam@gluster.com> | 2011-10-03 18:37:21 +0530 |
---|---|---|
committer | Selvasundaram <selvam@gluster.com> | 2011-10-03 18:37:21 +0530 |
commit | 30376af0ccfd314dc7a207655f268b5928f7369d (patch) | |
tree | bdc201180f1ffeadeb472f2fc07de3b358c7f0dd | |
parent | d612ce079d5e0ac375d8912f746ac4f89d5ea1f2 (diff) | |
parent | 4f281bf7e7b9dae9215e5c210833494efeea3c52 (diff) |
Merge branch 'master' of github.com:Selvasundaram/console
Conflicts:
src/com.gluster.storage.management.core/junit/com/gluster/storage/management/core/utils/DateUtilTest.java
src/com.gluster.storage.management.core/junit/com/gluster/storage/management/core/utils/FileUtilTest.java
2 files changed, 7 insertions, 9 deletions
diff --git a/src/com.gluster.storage.management.core/junit/com/gluster/storage/management/core/utils/DateUtilTest.java b/src/com.gluster.storage.management.core/junit/com/gluster/storage/management/core/utils/DateUtilTest.java index 36c8ec54..8b2fa2a1 100644 --- a/src/com.gluster.storage.management.core/junit/com/gluster/storage/management/core/utils/DateUtilTest.java +++ b/src/com.gluster.storage.management.core/junit/com/gluster/storage/management/core/utils/DateUtilTest.java @@ -1,7 +1,6 @@ package com.gluster.storage.management.core.utils; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.fail; import java.util.Date; @@ -50,7 +49,6 @@ public class DateUtilTest { String dateFormat = ""; String result = DateUtil.dateToString(date, dateFormat); - assertEquals("", result); } @@ -68,7 +66,6 @@ public class DateUtilTest { String dateFormat = CoreConstants.PURE_DATE_FORMAT; String result = DateUtil.dateToString(date, dateFormat); - assertEquals("09/29/2011", result); } @@ -192,6 +189,7 @@ public class DateUtilTest { throws Exception { String inputDate = ""; String dateFormat = ""; + DateUtil.stringToDate(inputDate, dateFormat); } diff --git a/src/com.gluster.storage.management.core/junit/com/gluster/storage/management/core/utils/FileUtilTest.java b/src/com.gluster.storage.management.core/junit/com/gluster/storage/management/core/utils/FileUtilTest.java index 084a8519..4ac55f01 100644 --- a/src/com.gluster.storage.management.core/junit/com/gluster/storage/management/core/utils/FileUtilTest.java +++ b/src/com.gluster.storage.management.core/junit/com/gluster/storage/management/core/utils/FileUtilTest.java @@ -28,8 +28,10 @@ import com.gluster.storage.management.core.exceptions.GlusterRuntimeException; */ public class FileUtilTest { + private String filePath = FileUtil.getTempDirName() + "/test.txt"; + /** * To write the text into given file. * @@ -53,7 +55,6 @@ public class FileUtilTest { return file.mkdirs(); } - private boolean createEmptyFile(String fileName) { File file = new File(fileName); if (file.exists()) { @@ -67,7 +68,6 @@ public class FileUtilTest { } } - /** * Run the File createTempDir() method test. * @@ -115,7 +115,6 @@ public class FileUtilTest { throws Exception { String fileName = ""; String contents = ""; - FileUtil.createTextFile(fileName, contents); } @@ -129,7 +128,6 @@ public class FileUtilTest { @Test public void testGetTempDirName_1() throws Exception { - String result = FileUtil.getTempDirName(); // while running on linux @@ -143,6 +141,7 @@ public class FileUtilTest { * * @generatedBy CodePro at 9/29/11 2:39 PM */ + @Test(expected=GlusterRuntimeException.class) public void testReadFileAsByteArray_1() throws Exception { @@ -176,6 +175,7 @@ public class FileUtilTest { * * @generatedBy CodePro at 9/29/11 2:39 PM */ + @Test(expected=GlusterRuntimeException.class) public void testReadFileAsString_1() throws Exception { @@ -195,7 +195,6 @@ public class FileUtilTest { @Test public void testReadFileAsString_2() throws Exception { - // Setup File file = new File(filePath); String result = FileUtil.readFileAsString(file); @@ -228,6 +227,7 @@ public class FileUtilTest { * * @generatedBy CodePro at 9/29/11 2:39 PM */ + @Test(expected=GlusterRuntimeException.class) public void testRecursiveDelete_2() throws Exception { @@ -306,6 +306,7 @@ public class FileUtilTest { * * @generatedBy CodePro at 9/29/11 2:39 PM */ + @Test(expected=GlusterRuntimeException.class) public void testRenameFile_1() throws Exception { @@ -349,7 +350,6 @@ public class FileUtilTest { assertTrue(new File(toPath).exists()); } - /** * Perform pre-test initialization. * |