Skip to content

Commit 38d6ca3

Browse files
committed
1 parent d6c1dc8 commit 38d6ca3

File tree

2 files changed

+86
-0
lines changed

2 files changed

+86
-0
lines changed

issue-790/pom.xml

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>org.instancio.github</groupId>
5+
<artifactId>issue-790</artifactId>
6+
<version>1.0-SNAPSHOT</version>
7+
8+
<properties>
9+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
10+
<java.version>17</java.version>
11+
<instancio.version>3.4.0</instancio.version>
12+
<assertj.version>3.24.2</assertj.version>
13+
<junit.version>5.9.2</junit.version>
14+
</properties>
15+
16+
<dependencies>
17+
<dependency>
18+
<groupId>org.instancio</groupId>
19+
<artifactId>instancio-junit</artifactId>
20+
<version>${instancio.version}</version>
21+
<scope>test</scope>
22+
</dependency>
23+
<dependency>
24+
<groupId>org.assertj</groupId>
25+
<artifactId>assertj-core</artifactId>
26+
<version>${assertj.version}</version>
27+
<scope>test</scope>
28+
</dependency>
29+
<dependency>
30+
<groupId>org.junit.jupiter</groupId>
31+
<artifactId>junit-jupiter</artifactId>
32+
<version>${junit.version}</version>
33+
<scope>test</scope>
34+
</dependency>
35+
</dependencies>
36+
37+
<build>
38+
<plugins>
39+
<plugin>
40+
<groupId>org.apache.maven.plugins</groupId>
41+
<artifactId>maven-compiler-plugin</artifactId>
42+
<version>3.11.0</version>
43+
<configuration>
44+
<release>${java.version}</release>
45+
</configuration>
46+
</plugin>
47+
<plugin>
48+
<groupId>org.apache.maven.plugins</groupId>
49+
<artifactId>maven-surefire-plugin</artifactId>
50+
<version>3.1.2</version>
51+
</plugin>
52+
</plugins>
53+
</build>
54+
55+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package org.example;
2+
3+
import org.instancio.Instancio;
4+
import org.instancio.junit.InstancioExtension;
5+
import org.junit.jupiter.api.Test;
6+
import org.junit.jupiter.api.extension.ExtendWith;
7+
8+
import static org.assertj.core.api.Assertions.assertThat;
9+
10+
@ExtendWith(InstancioExtension.class)
11+
class SampleTest {
12+
13+
static class A<T> {
14+
private T name;
15+
16+
T getName() {
17+
return name;
18+
}
19+
}
20+
21+
static class B extends A<String> {}
22+
23+
static class C extends B {}
24+
25+
@Test
26+
void shouldPopulateC() {
27+
C result = Instancio.create(C.class);
28+
29+
assertThat(result.getName()).isNotBlank();
30+
}
31+
}

0 commit comments

Comments
 (0)