浏览代码

One last unit test before the next run

git-svn-id: http://svn.dmdirc.com/trunk@3262 00569f92-eb28-0410-84fd-f71c24880f
tags/0.6
Chris Smith 16 年前
父节点
当前提交
a6cbd25d71
共有 1 个文件被更改,包括 38 次插入0 次删除
  1. 38
    0
      test/com/dmdirc/logger/ErrorReportStatusTest.java

+ 38
- 0
test/com/dmdirc/logger/ErrorReportStatusTest.java 查看文件

@@ -0,0 +1,38 @@
1
+/*
2
+ * Copyright (c) 2006-2008 Chris Smith, Shane Mc Cormack, Gregory Holmes
3
+ *
4
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ * of this software and associated documentation files (the "Software"), to deal
6
+ * in the Software without restriction, including without limitation the rights
7
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ * copies of the Software, and to permit persons to whom the Software is
9
+ * furnished to do so, subject to the following conditions:
10
+ *
11
+ * The above copyright notice and this permission notice shall be included in
12
+ * all copies or substantial portions of the Software.
13
+ *
14
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ * SOFTWARE.
21
+ */
22
+package com.dmdirc.logger;
23
+
24
+import org.junit.Test;
25
+import static org.junit.Assert.*;
26
+
27
+public class ErrorReportStatusTest extends junit.framework.TestCase {
28
+
29
+    @Test
30
+    public void testToString() {
31
+        assertTrue(ErrorReportStatus.ERROR.toString().toLowerCase().indexOf("error") > -1);
32
+        assertTrue(ErrorReportStatus.WAITING.toString().toLowerCase().indexOf("wait") > -1);
33
+        assertTrue(ErrorReportStatus.SENDING.toString().toLowerCase().indexOf("send") > -1);
34
+        assertTrue(ErrorReportStatus.FINISHED.toString().toLowerCase().indexOf("finish") > -1);
35
+        assertTrue(ErrorReportStatus.NOT_APPLICABLE.toString().toLowerCase().indexOf("not") > -1);
36
+    }
37
+
38
+}

正在加载...
取消
保存