Is there a way to capture the body of a post request that was stubbed with wiremock? I'm looking for something similar to Mockito's ArgumentCaptor. I ...
Is there a way to capture the body of a post request that was stubbed with wiremock? I'm looking for something similar to Mockito's ArgumentCaptor. I ...
I am writing a Cypress integration test for a Google Optimize experiment and I would like to stub the experiment variant value provided by gtag librar ...
I have a helper class (in Dart) like below: The responsibility of this class is providing app info. I'm using PackageInfo as one of the library. An ...
Sometimes I need to mock or stub a class that has a final method. I know that you should have an interface on such a class, but if the class is in a l ...
I am attempting to use Wiremock standalone with global response templating to dynamically map an input value (user id) with a response value (username ...
I have dealer.cars where a dealer has many cars. In my spec i want to stub dealer.cars.delete(car) to return false. However i cannot get this to work. ...
I have been tasked with writing tests for an s3 uploading function which uses S3.Object.wait_until_exists to wait for upload to complete and get the c ...
I want a Mockito mock to return several values one after another when the same function is called on the mock, and have those values come from a list, ...
I'm working on unit tests for my lambda which is getting some files from S3, processing them and loading data from them to DynamoDB. I created botocor ...
For some reason, I am not able to stub this here. I have reduced my code to almost exactly this here. This should work according to the docs, but I'm ...
I need to simulate a scenario where my test needs to be returning a particular value for String.length function i.e- String str[]= abc.getValue(); if ...
I am stubbing properties with sinon. I have trouble understanding how the related spying works. Most of the sinon spy methods seem to be related to fu ...
I am trying to stub the env variable to access Rails.env.production? but I always get this error Module method im testing Rspec version An ...
I've been trying to stub a private module method for the whole day now but with not progress. Here is a snippet of my application controller class ...
I'm struggling to stub a method where IntelliJ creates an inferred annotation not null on the parameter: i tried to stub it this way, i also tried ...
I'm stumped how to mock a method that accepts a Class as an argument. like for example. Any combinations of any(Class.class) or any(Class<SomeEn ...
Can't see to find any good docs on how to mock/stub the server Sider side requests with playwright. An example would be to intercept the getServerSid ...
If I stub my function like so: And then I try to do getInfoStub.restore() I get a TypeError: getInfoStub.restore is not a function However when I ...
I have a URL (GET REQUEST) of the following pattern ^/testpath/1/test?pathid=1 ^/testpath/1/test?pathid=1,2 ^/testpath/1/test?pathid=1,2,5 ...
I need to stub an asynchronous generic method in C#. The live method calls a REST API and uses Newtonsoft JSON to deserialise the results into the app ...