summaryrefslogtreecommitdiff
path: root/src/test/java/com/mesasoft/cn/dao/FileDAOTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/com/mesasoft/cn/dao/FileDAOTest.java')
-rw-r--r--src/test/java/com/mesasoft/cn/dao/FileDAOTest.java32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/test/java/com/mesasoft/cn/dao/FileDAOTest.java b/src/test/java/com/mesasoft/cn/dao/FileDAOTest.java
new file mode 100644
index 0000000..d96328c
--- /dev/null
+++ b/src/test/java/com/mesasoft/cn/dao/FileDAOTest.java
@@ -0,0 +1,32 @@
+package com.mesasoft.cn.dao;
+
+import com.mesasoft.cn.SketchApplicationTest;
+import com.zhazhapan.util.Formatter;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+/**
+ * @author pantao
+ * @since 2018/2/5
+ */
+@RunWith(SpringRunner.class)
+@SpringBootTest
+public class FileDAOTest {
+
+ @Autowired
+ FileDAO fileDAO;
+
+ @Test
+ public void testRemoveFile() {
+ assert fileDAO.removeById(3);
+ }
+
+ @Test
+ public void testGetUserDownloaded() {
+ SketchApplicationTest.setSettings();
+ System.out.println(Formatter.listToJson(fileDAO.listUserDownloaded(2, 0, "")));
+ }
+}