This is an automated email from the ASF dual-hosted git repository.

juanpablo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jspwiki.git

commit d97ea47f71de1b8c96328e8ac831123c0eff9de0
Author: juanpablo <[email protected]>
AuthorDate: Fri Mar 27 19:53:32 2020 +0100

    use Page/Attachment SPI
---
 .../org/apache/wiki/render/markdown/MarkdownRendererTest.java    | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git 
a/jspwiki-markdown/src/test/java/org/apache/wiki/render/markdown/MarkdownRendererTest.java
 
b/jspwiki-markdown/src/test/java/org/apache/wiki/render/markdown/MarkdownRendererTest.java
index 81c3c7e..65c7034 100644
--- 
a/jspwiki-markdown/src/test/java/org/apache/wiki/render/markdown/MarkdownRendererTest.java
+++ 
b/jspwiki-markdown/src/test/java/org/apache/wiki/render/markdown/MarkdownRendererTest.java
@@ -20,13 +20,12 @@ package org.apache.wiki.render.markdown;
 
 import net.sf.ehcache.CacheManager;
 import org.apache.wiki.TestEngine;
-import org.apache.wiki.WikiPage;
+import org.apache.wiki.api.core.Attachment;
 import org.apache.wiki.api.core.Context;
 import org.apache.wiki.api.core.Engine;
 import org.apache.wiki.api.core.Page;
 import org.apache.wiki.api.exceptions.WikiException;
 import org.apache.wiki.api.spi.Wiki;
-import org.apache.wiki.attachment.Attachment;
 import org.apache.wiki.attachment.AttachmentManager;
 import org.apache.wiki.pages.PageManager;
 import org.apache.wiki.parser.markdown.MarkdownParser;
@@ -196,7 +195,7 @@ public class MarkdownRendererTest {
         final String src = "This should be an [attachment 
link](Test/TestAtt.txt)";
         newPage( "Test" );
 
-        final Attachment att = new Attachment( testEngine, "Test", 
"TestAtt.txt" );
+        final Attachment att = Wiki.contents().attachment( testEngine, "Test", 
"TestAtt.txt" );
         att.setAuthor( "FirstPost" );
         testEngine.getManager( AttachmentManager.class ).storeAttachment( att, 
testEngine.makeAttachmentFile() );
 
@@ -292,11 +291,11 @@ public class MarkdownRendererTest {
     }
 
     String translate( final String src ) throws Exception {
-        return translate( new WikiPage( testEngine, PAGE_NAME ), src );
+        return translate( Wiki.contents().page( testEngine, PAGE_NAME ), src );
     }
 
     String translate( final Engine e, final String src ) throws Exception {
-        return translate( e, new WikiPage( testEngine, PAGE_NAME ), src );
+        return translate( e, Wiki.contents().page( testEngine, PAGE_NAME ), 
src );
     }
 
     String translate( final Page p, final String src ) throws Exception {

Reply via email to