How to test Function passed as an argument in Flutter? code: test: Or maybe testing this way is not the idiomatic way, because the test becomes ...
How to test Function passed as an argument in Flutter? code: test: Or maybe testing this way is not the idiomatic way, because the test becomes ...
I am upgrading from .NET Framework to .NET Core and I am having a problem with ShowDialog. With .NET Framework and unit testing the ShowDialog hits th ...
I've got a try block like so: Which gets called via a unit test where api.call_to_api() is patched as following: In the test it does not catch t ...
I have an integration test in my project that should use DateTime.Now. This is my method: My handler method that call this method : By default ...
Supposedly I have the following endpoint: https://dummy-url/api/query/elements?MY_CONDITION_1%20LESSOREQUAL%20{a_number} As you can see, a_number is ...
I am trying to test with my code by mocking the PyGithub library. I want to create a repository for an organization. So first I need to get it and on ...
I was hoping that someone could give me guidance on some of the approaches I've tried for mocking. I'm really trying to understand what the best metho ...
How to inject dependency for ServiceProvider in xUnit used for injecting cache object. xUnit gives the below error ...
I have a program that uses the Python fileinput module, and I am trying to write unittests for the main() function. They work find when using an actua ...
I have a class in which i use strategy pattern it looks something like this: StuffStrategy is a function that returns other functions which use thi ...
I've classes similar to this: I need to write unit test for Class2, CreateSomething method - how do I mock PostAndDeserialize method ? I've tried a ...
This question is similar to this one but for EasyMock instead of Mockito. I have some test code like this. But this leads to the second line throw ...
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 ...
For some reason, the following test fails because "response" is null, but it should not, because I use the when() function to return an initialized ob ...
I have object I want to write a test on something method, How can I mock something2 ...
I have a case class that represents a phone number, and provides some helper methods that are used elsewhere in the code. One of these methods calls o ...
I'm using Chai, Mocha for testing in my project. I want to test the createTreefromFolder function from a module tree.js: export function createTreefr ...
Currently I have setup a provider test, that actually calls my provider and returns a response, which is then compared in the pact broker to the expec ...
. Answers to this question are eligible for a +50 reputation bounty. To ...
Does anyone know how can I mock AWS resources and their operations for local development? Currently I have a lambda that inserts values into dynamoDB. ...