During my unit tests using Spock and Testcontainers, the JpaRepository is not functioning properly and is not being wired correctly. This issue persis ...
During my unit tests using Spock and Testcontainers, the JpaRepository is not functioning properly and is not being wired correctly. This issue persis ...
I need to create a Script from a String and execute it in the context of the current test class. Here's my simplified code: This gives me the follo ...
Using the custom WebClient below: @Slf4j @RequiredArgsConstructor @Component public class TransitApiClient { private final TransitApiClientPrope ...
I am writing unit tests with Spock for a series of nested objects. The code I'm writing tests for is quite legacy and doesn't use dependency injection ...
I have a Java method that looks something like this: I have a groovy/spock test and I need to test the method and I need to mock the Utils and make ...
I am trying to mock an instance method within a real object which is injected within my Test class in spock and I am using Micronaut (with Java) for w ...
With Spock upgrade to 2.4-M1-groovy-3.0 we found out that test reports for our data driven tests (= using @Unroll Spock annotation) contain an additio ...
How can I ensure that my tests will never use the production MongoDB URI in my Micronaut application? I am currently using an embedded server in my t ...
I'm trying to put traces into a Spock test to see how the PostgreSQL container was created by the testcontainer. But neither with log4j , nor with pri ...
I have problem with Spring Spock integration. I have SpringBoot test in Spock which set up Application Context. If for some reason Spring context is b ...
I am testing using the spock framework in groovy language. I want to test TestService, and TestService uses TestRepository as below code. The test ...
I want to parametrice when i have a header and then separator when I read a csv from Spark. I've written this: I'm new to Groovy and I don't get da ...
I am trying to write some test with where but it seems like the data mentioned in where block is not being passed, (I found the values to be null). He ...
Trying to use Spock mocks to verify method invocation arguments. Documentation and most of the examples in the internet contain example for single arg ...
This is the Controller as it appears at the moment. Here is the Controller Advice to handle exceptions And this is the current test, which works ...
I am trying to simulate io.micronaut.http.client.exceptions.ReadTimeoutException with Spock, but explicitly the exception cannot be thrown, as it cann ...
I have a Grails 5.2.5 app with a Spock 2.0 test. In it, I try to delete an entity like so: It fails. The saved entity stays there after the deletio ...
I am learning Spock so this may be very basic. public Random genRand() { try { return SecureRandom.getInstanceStrong(); } catch (NoSuchAlgo ...
It's good to see we can have detached mocks since Spock 1.1, especially if we want to create a mock utilities for boilerplate UT coding. But it seems ...
I want to add spock testing framework in micronaut but so I added these dependencies in micronaut: But when I am trying to import io.micronaut.test ...