I want to test a template class with gtest. I read about TYPED_TESTs in Google Test manual and looked at official example they reference, but still can't wrap m
I have got a problem connected with JSONObject. @Test public void toUrlTest() throws JSONException { String url; JSONObject json = new JSONObject();
below is an example of production code that I am trying to unit test. I am struggling to resolve a dependency to a concrete class that is being used. public My
Is it possible to have the fixture initialized only once and use it in multiple test cases within the same test suite? In the following example, fixture is cons
I am trying to write a simple test with moq. When calling the mocked method for the second time, after changing the return value from the first call, the moq fr
I use the mat-autocomplete functionality for searching in projects and want to test if entering a search string, which cannot be found in the project list, lead
Can you please let me know if we can merge the below 2 dataproviders public Object[][] dp1() { User user = new User(1L, "Arun"); Transaction trx = new Tr
At first I want to sorry for my english. I started to make some unit tests (i've never done this before, i'm a new guy in programming). I have to test simple
Application code is calling location.href = "some-url". I want to write a test that verify the navigation redirect has happened. Using jest on jsdom, I tried t
I have 2 Kotlin based AS projects. One works fine, the other doesn't. Both have an identical structure and gradle config. I'm using Kotlin 1.1.4-2 with AS 3.0b2
I have tried to run Parameterized Unit Tests in Android Studio, as shown below: import android.test.suitebuilder.annotation.SmallTest; import junit.framework
I want to mock a query provided on my repository like this: @Test public void GetByEmailSuccessful() { // setup mocks Mockito.when(this.personRepo.find
Looking at the set up for go-vcr // Start our recorder r, err := recorder.New("fixtures/etcd") if err != nil { log.Fatal(err) } defer r.
I am testing an parameter sent to a mocked event handler. The parameter is an object of "Event" sub-type, which itself has some data nested inside it. I want to
As per last section of the Moq Quickstart defined here, I am trying to configure the following Mock in order to pass Form values to the controller method under
I am currently doing unit test for the services in Nestjs using Jest, one of which is using the google Oauth service. My goal is to verify the token from google
I am looking for a way to have a separate layer of business logic in a MVC4 app with Entity Framework, without having to inject my (real or fake) database conte
I'm learning xUnit and so far, have found it to be a most useful tool. It's making me rethink some of my coding tactics to TDD instead. However, I've come acro
I'm trying to write a unit test to see if the base class method gets called Here is the base class export abstract class Animal{ protected eatFood() {
The ES6 module that I want to test looks as follows: function privateFunction() { ... } export function publicFunction() { ... does something ... priva