|
|
|
|
|
|
|
|
|
|
Re: Implementing AbstractLanguageServerTest in Maven project [message #1827558 is a reply to message #1827550] |
Mon, 18 May 2020 08:08   |
Eclipse User |
|
|
|
package org.xtext.example.mydsl.tests;
import java.util.ServiceLoader;
import org.eclipse.xtext.ISetup;
import org.eclipse.xtext.xbase.lib.IterableExtensions;
import org.junit.Assert;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
public class DemoTest {
@BeforeEach
public void setup() {
ServiceLoader<ISetup> sl = ServiceLoader.<ISetup>load(ISetup.class);
Assert.assertFalse(IterableExtensions.isEmpty(sl));
}
@Test
public void test02_openFile() {
}
}
shows the problem in a simply test too.
=> this seems to be a tycho bug
please ask at tycho-user mailing list
|
|
|
|
|
Re: Implementing AbstractLanguageServerTest in Maven project [message #1827563 is a reply to message #1827562] |
Mon, 18 May 2020 10:09   |
Eclipse User |
|
|
|
looks like this one works
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.xtext.example.mydsl2</groupId>
<artifactId>org.xtext.example.mydsl2.parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>org.xtext.example.mydsl2.tests</artifactId>
<packaging>eclipse-plugin</packaging>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.xtend</groupId>
<artifactId>xtend-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
<executions>
<execution>
<id>test</id>
<phase>test</phase>
<configuration>
<testSourceDirectory>src,src-gen,xtend-gen,testlang-src,testlang-src-gen</testSourceDirectory>
<testClassesDirectory>target/classes</testClassesDirectory>
<failIfNoTests>true</failIfNoTests>
<includes>
<include>**/*Test.java</include>
</includes>
</configuration>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.22.1</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
a similar adaption for junit5 should work too
|
|
|
|
Powered by
FUDForum. Page generated in 0.04295 seconds