Commit 0315d856 authored by Liang Ding's avatar Liang Ding

🎨 去除构建过程中的警告输出 #12322

parent ff84d347
...@@ -15,22 +15,22 @@ ...@@ -15,22 +15,22 @@
*/ */
package org.b3log.solo.repository.impl; package org.b3log.solo.repository.impl;
import java.util.List;
import junit.framework.Assert; import junit.framework.Assert;
import org.apache.commons.lang.time.DateUtils; import org.apache.commons.lang.time.DateUtils;
import org.b3log.latke.repository.Transaction; import org.b3log.latke.repository.Transaction;
import org.b3log.solo.AbstractTestCase; import org.b3log.solo.AbstractTestCase;
import org.b3log.solo.SoloServletListener;
import org.b3log.solo.model.ArchiveDate; import org.b3log.solo.model.ArchiveDate;
import org.b3log.solo.repository.ArchiveDateRepository; import org.b3log.solo.repository.ArchiveDateRepository;
import org.json.JSONObject; import org.json.JSONObject;
import org.testng.annotations.Test; import org.testng.annotations.Test;
import java.util.List;
/** /**
* {@link ArchiveDateRepositoryImpl} test case. * {@link ArchiveDateRepositoryImpl} test case.
* *
* @author <a href="http://88250.b3log.org">Liang Ding</a> * @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.0.0.1, Jan 18, 2013 * @version 1.0.0.2, Jul 20, 2017
*/ */
@Test(suiteName = "repository") @Test(suiteName = "repository")
public class ArchiveDateRepositoryImplTestCase extends AbstractTestCase { public class ArchiveDateRepositoryImplTestCase extends AbstractTestCase {
...@@ -70,6 +70,7 @@ public class ArchiveDateRepositoryImplTestCase extends AbstractTestCase { ...@@ -70,6 +70,7 @@ public class ArchiveDateRepositoryImplTestCase extends AbstractTestCase {
final JSONObject archiveDate = archiveDateRepository.getByArchiveDate("2011/12"); final JSONObject archiveDate = archiveDateRepository.getByArchiveDate("2011/12");
Assert.assertNotNull(archiveDate); Assert.assertNotNull(archiveDate);
System.out.println(archiveDate.toString(SoloServletListener.JSON_PRINT_INDENT_FACTOR)); Assert.assertEquals(archiveDate.optInt(ArchiveDate.ARCHIVE_DATE_ARTICLE_COUNT), 1);
//System.out.println(archiveDate.toString(SoloServletListener.JSON_PRINT_INDENT_FACTOR));
} }
} }
...@@ -47,7 +47,7 @@ public class OptionMgmtServiceTestCase extends AbstractTestCase { ...@@ -47,7 +47,7 @@ public class OptionMgmtServiceTestCase extends AbstractTestCase {
option.put(Option.OPTION_VALUE, 0L); option.put(Option.OPTION_VALUE, 0L);
final String id = optionMgmtService.addOrUpdateOption(option); final String id = optionMgmtService.addOrUpdateOption(option);
System.out.println(id); //System.out.println(id);
Assert.assertNotNull(id); Assert.assertNotNull(id);
final JSONObject opt = getOptionQueryService().getOptionById(Option.ID_C_BROADCAST_CHANCE_EXPIRATION_TIME); final JSONObject opt = getOptionQueryService().getOptionById(Option.ID_C_BROADCAST_CHANCE_EXPIRATION_TIME);
...@@ -69,7 +69,7 @@ public class OptionMgmtServiceTestCase extends AbstractTestCase { ...@@ -69,7 +69,7 @@ public class OptionMgmtServiceTestCase extends AbstractTestCase {
option.put(Option.OPTION_VALUE, 0L); option.put(Option.OPTION_VALUE, 0L);
final String id = optionMgmtService.addOrUpdateOption(option); // Add final String id = optionMgmtService.addOrUpdateOption(option); // Add
System.out.println(id); //System.out.println(id);
Assert.assertNotNull(id); Assert.assertNotNull(id);
option = new JSONObject(); option = new JSONObject();
......
...@@ -77,6 +77,6 @@ public final class MarkdownsTestCase { ...@@ -77,6 +77,6 @@ public final class MarkdownsTestCase {
markdownText = "The first: &#39; <br/> The second: &AElig;"; markdownText = "The first: &#39; <br/> The second: &AElig;";
html = Markdowns.toHTML(markdownText); html = Markdowns.toHTML(markdownText);
Assert.assertEquals(html, "<p>The first: ' <br/> The second: ?</p>"); Assert.assertEquals(html, "<p>The first: ' <br/> The second: Æ</p>\n");
} }
} }
...@@ -15,17 +15,11 @@ ...@@ -15,17 +15,11 @@
*/ */
package org.b3log.solo.util; package org.b3log.solo.util;
import java.io.FileInputStream;
import java.net.URL;
import java.net.URLDecoder;
import java.util.List;
import java.util.Locale;
import org.apache.commons.io.IOUtils;
import org.b3log.latke.Latkes; import org.b3log.latke.Latkes;
import org.b3log.latke.util.Stopwatchs;
import org.b3log.latke.util.Strings;
import org.testng.annotations.Test;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.Test;
import java.util.Locale;
/** /**
* {@link org.b3log.solo.util.Thumbnails} test case. * {@link org.b3log.solo.util.Thumbnails} test case.
...@@ -48,6 +42,6 @@ public final class ThumbnailsTestCase { ...@@ -48,6 +42,6 @@ public final class ThumbnailsTestCase {
final String gravatarURL = Thumbnails.getGravatarURL("test@b3log.org", "128"); final String gravatarURL = Thumbnails.getGravatarURL("test@b3log.org", "128");
System.out.println(gravatarURL); Assert.assertEquals(gravatarURL, Thumbnails.GRAVATAR + "bd7e4673cf7fa4b4777353008c86e093?s=128");
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment