Category "unit-testing"

How to mock an IFormFile for a unit/integration test in ASP.NET Core?

I want to write tests for uploading of files in ASP.NET Core but can't seem to find a nice way to mock/instantiate an object derived from IFormFile. Any suggest

ERROR in ./src/polyfills.ts Module not found: Error: Can't resolve 'zone.js/dist/zone'

I have an angular 8, that uses karma/jasmine to run some unit tests. I can run tests by executing the following command ng test but I'm getting the following er

parametrized tests with Mocha

How can I create parametrized tests with Mocha? Sample use case: I have 10 classes, that are 10 different implementations of the same interface. I want to run

Mocking HttpClient in unit tests

I have some issues trying to wrap my code to be used in unit tests. The issues is this. I have the interface IHttpHandler: public interface IHttpHandler { H

Is there a way to do deep comparison on a nested property with Hamcrest

I use hamcrest for most of my testing ,but have encountered a issue with it not being able to test a property one level down in the object graph .A snipped of m

Maven doesn't execute any unit test

I am using Maven with multi-modules. There are 3 projects. foo(the parent project) foo-core foo-bar I configure all the dependencies and plugins in foo's pom

PyCharm - no tests were found?

I've been getting na error in PyCharm and I can't figure out why I'm getting it: No tests were found This is what I have for my point_test.py: import unittest

How to test chrome extensions?

Is there a good way to do this? I'm writing an extension that interacts with a website as a content script and saves data using localstorage. Are there any tool