From 76fe67690fc6f365ada652d546900112d382ee66 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 11 Jan 2017 13:05:15 +0300 Subject: fix tests --- src/test/java/com/juick/rss/LegacyRSS.java | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'src/test/java/com/juick/rss') diff --git a/src/test/java/com/juick/rss/LegacyRSS.java b/src/test/java/com/juick/rss/LegacyRSS.java index 1d6ef151..220f00cb 100644 --- a/src/test/java/com/juick/rss/LegacyRSS.java +++ b/src/test/java/com/juick/rss/LegacyRSS.java @@ -19,26 +19,21 @@ package com.juick.rss; import com.juick.Message; import com.juick.Tag; -import com.juick.server.MessagesQueries; -import com.juick.server.UserQueries; import com.juick.util.DateFormattersHolder; import com.juick.util.MessageUtils; -import org.apache.commons.dbcp2.BasicDataSource; import org.apache.commons.lang3.CharEncoding; import org.apache.commons.lang3.StringEscapeUtils; import org.apache.commons.lang3.math.NumberUtils; import org.springframework.jdbc.core.JdbcTemplate; import javax.servlet.ServletException; -import javax.servlet.annotation.WebServlet; -import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.PrintWriter; +import java.util.Collections; import java.util.Date; import java.util.List; -import java.util.Properties; /** * @author ugnich @@ -61,7 +56,7 @@ public class LegacyRSS { int hours = NumberUtils.toInt(request.getParameter("hours"), 0); if (hours > 0 && hours < 13) { List mids = getLastMessages(hours); - List msgs = MessagesQueries.getMessages(sql, mids); + List msgs = Collections.emptyList(); //MessagesQueries.getMessages(sql, mids); responseMessages(response, 0, null, msgs); } else { response.sendError(HttpServletResponse.SC_NOT_FOUND); @@ -75,11 +70,11 @@ public class LegacyRSS { } } else if (uri.matches("^/[a-zA-Z0-9\\-]{2,16}/blog$")) { String uname = uri.substring(1, uri.length() - 5); - int uid = UserQueries.getUIDbyName(sql, uname); + int uid = 0; // UserQueries.getUIDbyName(sql, uname); if (uid > 0) { - List mids = MessagesQueries.getUserBlog(sql, uid, 0, 0); + List mids = Collections.emptyList(); //MessagesQueries.getUserBlog(sql, uid, 0, 0); if (!mids.isEmpty()) { - List msgs = MessagesQueries.getMessages(sql, mids); + List msgs = Collections.emptyList();// MessagesQueries.getMessages(sql, mids); responseMessages(response, uid, uname, msgs); } else { response.sendError(HttpServletResponse.SC_NOT_FOUND); -- cgit v1.2.3