Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
fix default/httpd.mime Z file extension to lower case + test case
reger1ccc44e6814e
diff --git a/defaults/httpd.mime b/defaults/httpd.mimeindex 813cae3cc..b71bfc136 100644--- a/defaults/httpd.mime+++ b/defaults/httpd.mime@@ -136,6 +136,6 @@ xltx = application/vnd.openxmlformats-officedocument.spreadsheetml.templatexpi = application/x-xpinstallxsl = text/xmlxml = text/xml-Z = application/x-compress+z = application/x-compresszip = application/zipdefault = application/octet-streamdiff --git a/test/java/net/yacy/cora/document/analysis/ClassificationTest.java b/test/java/net/yacy/cora/document/analysis/ClassificationTest.javanew file mode 100644index 000000000..670253d2b--- /dev/null+++ b/test/java/net/yacy/cora/document/analysis/ClassificationTest.java@@ -0,0 +1,50 @@+/**+ * ClassificationTest+ * part of YaCy+ * Copyright 2017 by reger24; https://github.com/reger24+ *+ * This library is free software; you can redistribute it and/or+ * modify it under the terms of the GNU Lesser General Public+ * License as published by the Free Software Foundation; either+ * version 2.1 of the License, or (at your option) any later version.+ *+ * This library is distributed in the hope that it will be useful,+ * but WITHOUT ANY WARRANTY; without even the implied warranty of+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU+ * Lesser General Public License for more details.+ *+ * You should have received a copy of the GNU Lesser General Public License+ * along with this program in the file lgpl21.txt+ * If not, see <http://www.gnu.org/licenses/>.+ */+package net.yacy.cora.document.analysis;++import java.io.File;+import org.junit.BeforeClass;+import org.junit.Test;+import static org.junit.Assert.*;++/**+ * Unit tests for Classification class.+ */+public class ClassificationTest {++ /**+ * Initialize with default file ext to mime file+ */+ @BeforeClass+ public static void setUpClass() {+ Classification.init(new File("defaults/httpd.mime"));+ }++ /**+ * Test of ext2mime method, of class Classification.+ */+ @Test+ public void testExt2mime_String() {+ String mime;+ mime = Classification.ext2mime("Z");+ assertEquals("application/x-compress", mime);+ }++}