I'm facing a problem when I want to run unit test on my c# project. I have the same behaviour using Visual Studio or command line. Here's my process: Ensure tha
I have a NodeJS application and I'm trying to write some tests. Currently, I'm trying to stub Firebase. Current code: sinon.stub(firebase, 'initializeApp'); con
Why is functional style testing facilitating testing compared to class based testing? Is this just additional library specific functionality or are there any ge
I have a function that calls a gRPC endpoint, converts the objects into POCO objects and returns them as a list. public class ActionPlanConnectionsService : ICo
I have some difficulties in unit testing a function. I'm new in these things and I don't know what I can do. I have to those 2 if. Any advice? Thank you.
I am running this test case command below py.test --cov-report term-missing --cov=pipelines/core/comp/plugins/abc/ --noconftest pipelines/core/comp/test/plugins
I'm trying to test that two async functions. The problem is that one of the functions is called every 10 seconds automatically. I tried to use tick() or flush()
I have a bunch of test modules and I can run a specific one using cabal test. cabal test Module.Name.Here The module contains many tests and one of them fails
I'm testing Django forms handling and trying to test a ModelForm, which form edits the user's data. I tried to write the test in several ways, but each one thro
I'm writing a simple test to assert if an api endpoint response returns with 200 status. My api got Bearer authentication through sanctum middleware. My test fu
I am testing a function that has a reference to a form in it (this.form), so when I try to test it I am wondering how I can mock that form so the function has a
I'm using Spring Boot and in a unit test, I'm trying to mock the Files.delete(myFile.toPath()) method. To do so I'm trying to use the Mockito.mockStatic() metho
I would like to run ansi C unit tests in VS by mean of Test Explorer (not only with Console). I saw that it's possible for C++ projects (https://docs.microsoft.
I had a mocked bean in a configuration: @Profile('test') @Configuration class TestSecurityConfig { private final mockFactory = new DetachedMockFactory() @Pr
I am pretty new at unit tests and have seen fairly basic examples of mocks and doing asserts that test the return value of a function. I have a fairly advanced
Login.js import {useSelector, useDispatch } from 'react-redux'; import Header from './Header'; import {submitForm, handleChange} from '../actions/authenticati
I've built this Telegram Bot in Python, with python-telegram-bot. It's not so complex, but I want to do some regression tests to check if everything works fine
I have this code @Test fun price_twelve_cupcakes() { val viewModel = OrderViewModel() viewModel.setQuantity(12) viewModel.price.observeForever {}
How do I make Singleton generic template, and how can I test it? Right now I am interested in seeing with my own eyes that 2 threads that invoke get_instance()
I am trying to test a method within a service that performs an http post. I have mock the service in my spec.ts and all seems correct for me, but the boolean va