automocking Questions

6

Solved

I've just started to use AutoFixture.AutoMoq in my unit tests and I'm finding it very helpful for creating objects where I don't care about the specific value. After all, anonymous object creation ...
Ungracious asked 29/5, 2013 at 16:37

1

I'm trying to set up a snapshot for a small react component but I keep getting the following error TypeError: val.getMockName is not a function it('renders correctly', () => { const wrapper = ...
Result asked 30/7, 2018 at 1:5

1

Solved

We are using Autofac.Extras.Moq.AutoMock. Now I have a constructor dependency using Lazy<> public MyService(Lazy<IDependency> myLazyDependency) {...} to test MyService we need to mock t...
Kindle asked 7/3, 2016 at 22:20

2

Solved

I'm running unit tests in a class library project with NSpec framework, AutofacContrib.NSubstitute v3.3.2.0, NSubstitute v1.7.0.0 (the latest as of now is 1.8.2). The Class Under Test instance is ...
Pease asked 25/6, 2015 at 14:45

3

Solved

I've recently been working on a project that has started to get fairly dependency heavy and have been exploring the idea of using an AutoMocking container to clean up my tests a bit and make them l...
Mudslinging asked 15/1, 2013 at 12:1

2

Solved

I am new to both libraries and before committing to their usage on a large project I need clarification on my options for low-code effort automocking in my unit tests. After spending some time on ...
Champion asked 3/5, 2014 at 13:31

1

Solved

I have a project which uses Qt5 and I have a CMakeLists.txt file that I use for creating the Visual Studio Solution. This is an excerpt of my CMakeLists.txt cmake_policy(SET CMP0020 NEW) set(CMAK...
Nonie asked 8/11, 2013 at 18:49

1

Solved

When I use Moq directly to mock IBuilderFactory and instantiate BuilderService myself in a unit test, I can get a passing test which verifies that the Create() method of IBuilderFactory is called...

3

Solved

Given this system to test: public class MySut { private readonly IHardToMockDependency _hardToMockDependency; public MySut(IHardToMockDependency hardToMockDependency, IOtherDependency otherD...
Poss asked 15/3, 2013 at 21:48

1

Solved

I use AutoFixture with AutoMoq. I try to create a fake instance of a class which has a property with a getter but without a setter. I expect AutoFixture to configure the mock so it will return the ...
Uneasy asked 11/3, 2013 at 12:40

2

Solved

The short takeaway now that the solution has been found: AutoFixture returns frozen the mock just fine; my sut that was also generated by AutoFixture just had a public property with a local defaul...
Pouched asked 21/11, 2012 at 0:21

1

Solved

I started to use moq but from my understanding I always have to mock up all the methods that could be called even if I really do not care about them. Sometimes it takes so long to mockup stuff yo...
Mohenjodaro asked 12/10, 2012 at 23:0

1

Solved

i wonder if it is possible to auto mock a container in MOQ without any additions to the MOQ lib. I am having problems finding a clean way to automock an IList. Thanks in advance!
Karikaria asked 23/12, 2011 at 9:24

1

Solved

I have a fair amount of experience using MOQ, while I've recently have stumbled into AutoFixture. What are the differences between these frameworks?
Tiertza asked 26/4, 2011 at 6:10
1

© 2022 - 2024 — McMap. All rights reserved.