File tree Expand file tree Collapse file tree 2 files changed +1
-12
lines changed
src/test/groovy/org/grails/transaction Expand file tree Collapse file tree 2 files changed +1
-12
lines changed Original file line number Diff line number Diff line change 1- configurations. all {
2- resolutionStrategy {
3- force " org.hamcrest:hamcrest-core:1.3"
4- }
5- }
6-
71dependencies {
82 compileOnly " org.aspectj:aspectjrt" , " org.aspectj:aspectjweaver"
93 api " jakarta.inject:jakarta.inject-api"
@@ -27,7 +21,7 @@ dependencies {
2721
2822 testImplementation " org.springframework:spring-jdbc"
2923
30- testImplementation " org.hamcrest:hamcrest-core:1.3 "
24+ testImplementation " org.hamcrest:hamcrest"
3125
3226 testRuntimeOnly " com.h2database:h2"
3327 testRuntimeOnly " com.fasterxml.jackson.core:jackson-databind"
Original file line number Diff line number Diff line change 1616package org .grails .transaction ;
1717
1818import org .hamcrest .Description ;
19- import org .hamcrest .Factory ;
2019import org .junit .jupiter .api .Test ;
2120import org .springframework .transaction .*;
2221import org .springframework .transaction .support .DefaultTransactionDefinition ;
@@ -176,7 +175,6 @@ public TestPlatformTransactionManager(String name) {
176175 this .name = name ;
177176 }
178177
179- @ Factory
180178 static PlatformTransactionManager createFailingTransactionManager (String name ) {
181179 return new TestPlatformTransactionManager (name + "-failing" ) {
182180 @ Override
@@ -191,7 +189,6 @@ public void rollback(TransactionStatus status) throws TransactionException {
191189 };
192190 }
193191
194- @ Factory
195192 static PlatformTransactionManager createNonFailingTransactionManager (String name ) {
196193 return new TestPlatformTransactionManager (name + "-non-failing" );
197194 }
@@ -296,12 +293,10 @@ public void describeTo(Description description) {
296293 description .appendText ("that a " + (commitCheck ? "committed" : "rolled-back" ) + " TransactionManager" );
297294 }
298295
299- @ Factory
300296 public static TransactionManagerMatcher isCommitted () {
301297 return new TransactionManagerMatcher (true );
302298 }
303299
304- @ Factory
305300 public static TransactionManagerMatcher wasRolledback () {
306301 return new TransactionManagerMatcher (false );
307302 }
You can’t perform that action at this time.
0 commit comments