Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
X
xwiki-platform
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
XWiki
xwiki-platform
Commits
499f45d8
Commit
499f45d8
authored
2 months ago
by
Thomas Mortagne
Browse files
Options
Downloads
Patches
Plain Diff
[Misc] Improve test
(cherry picked from commit
d53d6e34
)
parent
8607d3dc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-templates/src/test/java/org/xwiki/web/CreateInlinePageTest.java
+7
-2
7 additions, 2 deletions
...tes/src/test/java/org/xwiki/web/CreateInlinePageTest.java
with
7 additions
and
2 deletions
xwiki-platform-core/xwiki-platform-web/xwiki-platform-web-templates/src/test/java/org/xwiki/web/CreateInlinePageTest.java
+
7
−
2
View file @
499f45d8
...
...
@@ -31,11 +31,13 @@
import
org.junit.jupiter.api.Test
;
import
org.junit.jupiter.params.ParameterizedTest
;
import
org.junit.jupiter.params.provider.MethodSource
;
import
org.xwiki.model.reference.DocumentReference
;
import
org.xwiki.template.TemplateManager
;
import
org.xwiki.test.page.PageTest
;
import
org.xwiki.velocity.VelocityManager
;
import
com.xpn.xwiki.XWikiException
;
import
com.xpn.xwiki.doc.XWikiDocument
;
import
static
org
.
junit
.
jupiter
.
api
.
Assertions
.
assertEquals
;
import
static
org
.
junit
.
jupiter
.
api
.
Assertions
.
assertNotNull
;
...
...
@@ -60,17 +62,20 @@ class CreateInlinePageTest extends PageTest
private
static
final
String
ERROR_MESSAGE_CLASS
=
"errormessage"
;
@Inject
private
VelocityManager
velocityManager
;
@Inject
private
TemplateManager
templateManager
;
@BeforeEach
void
setup
()
throws
Exception
void
setup
()
{
this
.
velocityManager
=
this
.
oldcore
.
getMocker
().
getInstance
(
VelocityManager
.
class
);
// Set an empty list of recommended template providers to avoid a Velocity error.
this
.
velocityManager
.
getVelocityContext
().
put
(
"recommendedTemplateProviders"
,
List
.
of
());
// Set a context document to avoid problems
this
.
oldcore
.
getXWikiContext
().
setDoc
(
new
XWikiDocument
(
new
DocumentReference
(
"xwiki"
,
"space"
,
"page"
)));
}
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment