I am trying to verify that .shuffled() on a list is called, but get an error on running because of a prior .take(6) call on the list, and I cannot see ...
I am trying to verify that .shuffled() on a list is called, but get an error on running because of a prior .take(6) call on the list, and I cannot see ...
I'm trying to test a private method which takes the below parameters as input : ClassToBeTested TestClass I end up getting the below error : ...
I am writing unit tests in kotlin, for this purpose I need to assign value on a "val", here is the simplified version of the code: it has an compil ...
I have a function in my ViewModel in which I subscribe to some updates, I want to write a test that will check that after the subscribe is triggered, ...
I'm currently getting the following error when I try to test my service: Currently, my test file looks like this: and my build.gradle.kts looks ...
I am using Gradle 7.5, Quarkus 2.12.3 and mockk 1.13.3. When I try to run quarkusDev task from command line and then start continuous testing (by pres ...
I am trying to verify that a function was not called using the following: That verification fails with the message: Verification failed: call 1 ...
I was learning about Unit Testing with Mockk library, and the function i was testing is using a verify. So i run the test with coroutine test runTest{ ...
I want to switch to Mockk, but i cant find analogue of this method in Mockk It doesn't work ...
I'm trying to use Mockk to mock a method with context receiver: class MyClass { // The method I'm going to mock context(CallContext) fun ...
Not sure what they mean at all but my tests fail with something like the following: the line is: what am I doing wrong? ...
I have a challenge with a class which I want to test but inside the class other objects will be created. This simple example shows the issue. It's ...
I have written test cases for my view model. Which when I run individually or when I run the Test class. They get executed successfully. But when I ru ...
I have a problem with MockK. I have a class: and a test for this class: Now the first test passes successfully, but the second one fails: n ...
I am testing my function. Inside on function parameter I am passing the Lambda with Arrangement.Vertical. I tried some piece of code but it giving me ...
I am trying to test DataSource with Proto DataStore. So, I am implementing like this: How can I test with Proto DataStore? I mean, I don't want ...
I am trying to perform a unit test and mock a retrofit call without success. When I run my test, I get only end printed. I should receive onResponse() ...
hey guys I have tried this but it doesn't work saying class de.foodfittery.cms.generated.graphql.backend.GetDietaryRestrictionQuery$Data cannot ...
I have a test subject that takes a function type in its constructor: In my test I can mock both dependencies: and specify expectations on the st ...
I am using Mockk as my mocking framework when testing my Spring Boot Data repository interfaces. Actually I am doing the following which should mo ...