Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
126 changes: 98 additions & 28 deletions entity-view/testsuite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,17 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>blaze-persistence-core-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>blaze-persistence-core-impl</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>blaze-persistence-core-testsuite</artifactId>
<version>${project.version}</version>
<exclusions>
<!-- I honestly don't know why, but the default profile seems to be actived for that dependency -->
<!-- I honestly don't know why, but the default profile seems to be active for that dependency -->
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
Expand All @@ -63,28 +61,24 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>blaze-persistence-entity-view-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>blaze-persistence-entity-view-impl</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>blaze-common-utils</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.googlecode.catch-exception</groupId>
<artifactId>catch-exception</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
Expand Down Expand Up @@ -457,12 +451,10 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>blaze-persistence-integration-hibernate-4.2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>blaze-persistence-testsuite-base-hibernate</artifactId>
<scope>test</scope>
</dependency>
<!-- IntelliJ apparently needs the annotation processor here -->
<dependency>
Expand Down Expand Up @@ -543,6 +535,18 @@
</sources>
</configuration>
</execution>
<execution>
<id>add-test-source-hibernate</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>src/test/hibernate</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
Expand All @@ -562,12 +566,10 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>blaze-persistence-integration-hibernate-4.3</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>blaze-persistence-testsuite-base-hibernate</artifactId>
<scope>test</scope>
</dependency>
<!-- IntelliJ apparently needs the annotation processor here -->
<dependency>
Expand Down Expand Up @@ -648,6 +650,18 @@
</sources>
</configuration>
</execution>
<execution>
<id>add-test-source-hibernate</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>src/test/hibernate</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
Expand All @@ -667,12 +681,10 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>blaze-persistence-integration-hibernate-5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>blaze-persistence-testsuite-base-hibernate</artifactId>
<scope>test</scope>
</dependency>
<!-- IntelliJ apparently needs the annotation processor here -->
<dependency>
Expand Down Expand Up @@ -753,6 +765,18 @@
</sources>
</configuration>
</execution>
<execution>
<id>add-test-source-hibernate</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>src/test/hibernate</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
Expand All @@ -772,12 +796,10 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>blaze-persistence-integration-hibernate-5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>blaze-persistence-testsuite-base-hibernate</artifactId>
<scope>test</scope>
</dependency>
<!-- IntelliJ apparently needs the annotation processor here -->
<dependency>
Expand Down Expand Up @@ -858,6 +880,18 @@
</sources>
</configuration>
</execution>
<execution>
<id>add-test-source-hibernate</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>src/test/hibernate</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
Expand All @@ -880,12 +914,10 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>blaze-persistence-integration-hibernate-5.2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>blaze-persistence-testsuite-base-hibernate</artifactId>
<scope>test</scope>
</dependency>
<!-- IntelliJ apparently needs the annotation processor here -->
<dependency>
Expand Down Expand Up @@ -966,6 +998,18 @@
</sources>
</configuration>
</execution>
<execution>
<id>add-test-source-hibernate</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>src/test/hibernate</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
Expand All @@ -985,12 +1029,10 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>blaze-persistence-integration-hibernate-5.3</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>blaze-persistence-testsuite-base-hibernate</artifactId>
<scope>test</scope>
</dependency>
<!-- IntelliJ apparently needs the annotation processor here -->
<dependency>
Expand Down Expand Up @@ -1071,6 +1113,18 @@
</sources>
</configuration>
</execution>
<execution>
<id>add-test-source-hibernate</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>src/test/hibernate</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
Expand Down Expand Up @@ -1100,12 +1154,10 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>blaze-persistence-integration-hibernate-5.4</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>blaze-persistence-testsuite-base-hibernate</artifactId>
<scope>test</scope>
</dependency>
<!-- IntelliJ apparently needs the annotation processor here -->
<dependency>
Expand Down Expand Up @@ -1186,6 +1238,18 @@
</sources>
</configuration>
</execution>
<execution>
<id>add-test-source-hibernate</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>src/test/hibernate</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
Expand All @@ -1212,12 +1276,10 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>blaze-persistence-integration-hibernate-6.0</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>blaze-persistence-testsuite-base-hibernate</artifactId>
<scope>test</scope>
</dependency>
<!-- IntelliJ apparently needs the annotation processor here -->
<dependency>
Expand Down Expand Up @@ -1298,6 +1360,18 @@
</sources>
</configuration>
</execution>
<execution>
<id>add-test-source-hibernate</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>src/test/hibernate</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
Expand All @@ -1317,7 +1391,6 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>blaze-persistence-testsuite-base-eclipselink</artifactId>
<scope>test</scope>
</dependency>
<!-- IntelliJ apparently needs the annotation processor here -->
<dependency>
Expand Down Expand Up @@ -1454,7 +1527,6 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>blaze-persistence-testsuite-base-datanucleus</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
Expand Down Expand Up @@ -1615,7 +1687,6 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>blaze-persistence-testsuite-base-datanucleus</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
Expand Down Expand Up @@ -1883,7 +1954,6 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>blaze-persistence-testsuite-base-openjpa</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,15 +162,15 @@ public final void tearDown() {
protected void assertNullCollection(Collection<?> collection) {
// Currently, setting a collection to null will result in an empty recording collection after update
// assertNull(collection);
assertTrue(collection instanceof RecordingCollection);
assertEquals(0, collection.size());
Assert.assertTrue(collection instanceof RecordingCollection);
Assert.assertEquals(0, collection.size());
}

protected void assertNullMap(Map<?, ?> map) {
// Currently, setting a collection to null will result in an empty recording collection after update
// assertNull(map);
assertTrue(map instanceof RecordingMap);
assertEquals(0, map.size());
Assert.assertTrue(map instanceof RecordingMap);
Assert.assertEquals(0, map.size());
}

protected void registerViewTypes(EntityViewConfiguration cfg) {
Expand Down Expand Up @@ -240,12 +240,12 @@ protected AssertStatementBuilder assertQueriesAfterUpdate(T docView) {
protected void assertVersionDiff(long oldVersion, long currentVersion, long diff, long fullDiff) {
if (version) {
if (isFullMode()) {
assertEquals(oldVersion + fullDiff, currentVersion);
Assert.assertEquals(oldVersion + fullDiff, currentVersion);
} else {
assertEquals(oldVersion + diff, currentVersion);
Assert.assertEquals(oldVersion + diff, currentVersion);
}
} else {
assertEquals(oldVersion, currentVersion);
Assert.assertEquals(oldVersion, currentVersion);
}
}

Expand Down
Loading