[5.3.8.4] OSGi Plugin JUnit Test

3 views
Skip to first unread message

Giacomo Petillo

unread,
Apr 21, 2021, 10:16:52 AMApr 21
to dotCMS User Group

Hi all,
do you have an example of how to set up and write a JUnit test set for an OSGi plugin?

I still don't know gradle well and don't know how to add dependencies (Mokito, JUnit ...).

I'm developing three plugins,  a REST, an Actionlet and a Job Plugin, but I think that to schema is the same.

G.

jonathan...@dotcms.com

unread,
Apr 21, 2021, 12:01:03 PMApr 21
to dotCMS User Group
Hi Giacomo

You only have to create a folder under

src/test/java

And place your unit in there such as

import org.junit.Test;

public class MyTest {

@Test
public void testSomething () {

....

Reply all
Reply to author
Forward
0 new messages