Commit 9ddddeb6 authored by Liang Ding's avatar Liang Ding

#12861 链接图标测试用例

parent edbc7229
......@@ -36,7 +36,7 @@ import java.io.StringReader;
* {@link LinkConsole} test case.
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.0.0.0, Dec 11, 2018
* @version 1.0.0.1, Oct 23, 2019
* @since 2.9.8
*/
@Test(suiteName = "processor")
......@@ -68,6 +68,7 @@ public class LinkConsoleTestCase extends AbstractTestCase {
link.put(Link.LINK_TITLE, "黑客派");
link.put(Link.LINK_ADDRESS, "https://hacpai.com");
link.put(Link.LINK_DESCRIPTION, "黑客与画家的社区");
link.put(Link.LINK_ICON, "https://static.hacpai.com/images/favicon.png");
final BufferedReader reader = new BufferedReader(new StringReader(requestJSON.toString()));
request.setReader(reader);
......@@ -100,6 +101,7 @@ public class LinkConsoleTestCase extends AbstractTestCase {
link.put(Link.LINK_TITLE, "黑客派");
link.put(Link.LINK_ADDRESS, "https://hacpai.com");
link.put(Link.LINK_DESCRIPTION, "B3log 开源社区线上论坛");
link.put(Link.LINK_ICON, "https://static.hacpai.com/images/favicon.png");
final BufferedReader reader = new BufferedReader(new StringReader(requestJSON.toString()));
request.setReader(reader);
......
......@@ -28,7 +28,7 @@ import org.testng.annotations.Test;
* {@link LinkRepository} test case.
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.0.0.0, Dec 29, 2011
* @version 1.0.0.1, Oct 23, 2019
*/
@Test(suiteName = "repository")
public final class LinkRepositoryImplTestCase extends AbstractTestCase {
......@@ -49,6 +49,7 @@ public final class LinkRepositoryImplTestCase extends AbstractTestCase {
link1.put(Link.LINK_TITLE, "link title");
link1.put(Link.LINK_DESCRIPTION, "link description");
link1.put(Link.LINK_ADDRESS, "link address");
link1.put(Link.LINK_ICON, "link icon");
link1.put(Link.LINK_ORDER, link1Order);
Transaction transaction = linkRepository.beginTransaction();
......
......@@ -27,7 +27,7 @@ import org.testng.annotations.Test;
* {@link LinkMgmtService} test case.
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.0.0.1, Sep 11, 2012
* @version 1.0.0.2, Oct 23, 2019
*/
@Test(suiteName = "service")
public class LinkMgmtServiceTestCase extends AbstractTestCase {
......@@ -58,6 +58,7 @@ public class LinkMgmtServiceTestCase extends AbstractTestCase {
link.put(Link.LINK_TITLE, "link1 title");
link.put(Link.LINK_ADDRESS, "link1 address");
link.put(Link.LINK_DESCRIPTION, "link1 description");
link.put(Link.LINK_ICON, "link1 icon");
final String linkId = linkMgmtService.addLink(requestJSONObject);
Assert.assertNotNull(linkId);
......@@ -79,6 +80,7 @@ public class LinkMgmtServiceTestCase extends AbstractTestCase {
link.put(Link.LINK_TITLE, "link2 title");
link.put(Link.LINK_ADDRESS, "link2 address");
link.put(Link.LINK_DESCRIPTION, "link2 description");
link.put(Link.LINK_ICON, "link2 icon");
final String linkId = linkMgmtService.addLink(requestJSONObject);
Assert.assertNotNull(linkId);
......@@ -112,6 +114,7 @@ public class LinkMgmtServiceTestCase extends AbstractTestCase {
link.put(Link.LINK_TITLE, "link3 title");
link.put(Link.LINK_ADDRESS, "link3 address");
link.put(Link.LINK_DESCRIPTION, "link3 description");
link.put(Link.LINK_ICON, "link3 icon");
final String linkId = linkMgmtService.addLink(requestJSONObject);
Assert.assertNotNull(linkId);
......@@ -148,6 +151,7 @@ public class LinkMgmtServiceTestCase extends AbstractTestCase {
link.put(Link.LINK_TITLE, "link4 title");
link.put(Link.LINK_ADDRESS, "link4 address");
link.put(Link.LINK_DESCRIPTION, "link4 description");
link.put(Link.LINK_ICON, "link4 icon");
final String linkId = linkMgmtService.addLink(requestJSONObject);
Assert.assertNotNull(linkId);
......
......@@ -28,7 +28,7 @@ import org.testng.annotations.Test;
* {@link LinkQueryService} test case.
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.0.0.2, Nov 2, 2016
* @version 1.0.0.3, Oct 23, 2019
*/
@Test(suiteName = "service")
public class LinkQueryServiceTestCase extends AbstractTestCase {
......@@ -59,6 +59,7 @@ public class LinkQueryServiceTestCase extends AbstractTestCase {
link.put(Link.LINK_TITLE, "link1 title");
link.put(Link.LINK_ADDRESS, "link1 address");
link.put(Link.LINK_DESCRIPTION, "link1 description");
link.put(Link.LINK_ICON, "link1 icon");
final String linkId = linkMgmtService.addLink(requestJSONObject);
Assert.assertNotNull(linkId);
......
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