markt-asf commented on a change in pull request #227: Unit test FileStore 
utility methods
URL: https://github.com/apache/tomcat/pull/227#discussion_r352785849
 
 

 ##########
 File path: test/org/apache/catalina/session/FileStoreTest.java
 ##########
 @@ -0,0 +1,78 @@
+package org.apache.catalina.session;
+
+import org.apache.catalina.Manager;
+import org.apache.tomcat.unittest.TesterContext;
+import org.apache.tomcat.unittest.TesterServletContext;
+import org.apache.tomcat.util.http.fileupload.FileUtils;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import java.io.File;
+import java.io.IOException;
+
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+
+/**
+ * Test utility methods of FileStore class
+ *
+ * @author Govinda Sakhare
+ */
+public class FileStoreTest {
+
+    private static final String SESS_TEMPPATH = "SESS_TEMP";
+    private static final File dir = new File (SESS_TEMPPATH);
+    private static FileStore fileStore;
+    private static File file1 = new File (SESS_TEMPPATH + "/tmp1.session");
+    private static File file2 = new File (SESS_TEMPPATH + "/tmp2.session");
+    private static Manager manager = new StandardManager ();
+
+    @BeforeClass
+    public static void setup() throws IOException {
+        TesterContext testerContext = new TesterContext ();
+        testerContext.setServletContext (new TesterServletContext ());
+        manager.setContext (testerContext);
+        fileStore = new FileStore ();
+        fileStore.setManager (manager);
+    }
+
 
 Review comment:
   2 blank lines between methods please

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to