TL;DR
I would like to have some kind of automock feature enabled, but only (and only!) for the modules that I have explicitly defined in a corresponding __mocks__ folder. Is there a way for this in Jest?
General advices and suggestions are also…
I'm using testCafe for my functional test.
My project used a lot of XHR request and I don't want to waste my time to generate each single mock.
Exists an automocker like this: https://github.com/scottschafer/cypressautomocker for testcafe?
Qt with CMake often leads to trouble during linking.
After reading several posts and tries I found out that AUTOMOC takes source files given with add_executable but ignores my header files inside the include folder given with include_directories(…
There is the following source tree:
*-source
*----subsource
*--------Source1.hpp
*----Source1.hpp
Both files, ./Source1.hpp and ./subsource/Source1.hpp, must be handled by moc.
When using automoc it puts output moc files to the same directory with…
Problem:
Would someone help me figure out how to mock fs with jest using typescript? I've tried a few things, and here is the main one:
I'm attempting to use jest to mock 'fs', but I can't seem to get jest to automock the 'fs' library in…
Doesn't being required to virtualize all property accessors you want to mock kind of defeat the purpose of mocking?
I mean, if I have to modify my object and virtualize every single accesor I want to mock, couldn't I just as well inherit my class…
I am an avid user of the StructureMap MoqAutoMocker, sometimes, however, we run into an "old friend" of ours. Assume a class "Validator"
public class Validator
{
private string _connectionString;
private IEventMachine _eventMachine;
public…
Is it possible to create a class under test with FakeItEasy, where all dependencies that are declared in the constructor are initialized automatically with fakes?
Imagine the class:
public class Inserting
{
public Inserting(
…
Can anyone help, I am having problems using the auto-mocking that is available between Ninject and NSubstitute, actually the package is a ninject packaged called Ninject.MockingKernel.NSubstitute which should allow me to use Ninject to create mocks…
I have read Mark Seeman's article on auto-mocking and I'm now writing a re-usable windsor container based on that article.
My implementation of Mark's article (basically copied directly)
The main work is done in the AutoMoqResolver class. This will…
In essence I want to be able to moc header files that are not part of any target in cmake with the additional difficulty that I don't know the filenames of those headers.
The actual project is quite complex and part of an automated build system. The…
Been playing around with AutoMocking.
While using moq.contrib.indy am getting the following error when calling the controller
{"Value cannot be null.\r\nParameter name: controllerContext"}
var mocks = new AutoMockContainer(new…
one of my repository class (say PersonRepo) has a delegate as its property something like this
private readonly Func _nameRepo;
and apart from this it is inherited by a class which itself expects one more object (say the session).
Thus…
I am getting started with Automoq. I was trying to do something like this:
mocker.GetMock();
var line = mocker.Resolve();
line.PropertyOne = .75;
line.PropertyTwo = 100;
MyCalc calc = new…
I have constructor containing IEnumerable parameter. When I try to Inject concrete object to automocker it is not used.
When I use wrapper class containing IEnumerable property all works as expected.
How can I test TestClass1?
IEnumerable…