automoq Questions

1

Solved

I am trying to unit test code that uses SearchClient.SearchAsync() method. I am using AutoFixture.AutoMoq nuget package. Here is what I tried: mockSearchClient.Setup(msc => msc.SearchAsync<My...
Sluggish asked 1/10, 2020 at 16:57

1

Solved

UPDATE: AutoFixture team released a fix for this in version 3.51. Simply extend the AutoDataAttribute doing so: public class AutoDataFixedNameAttribute : AutoDataAttribute { public AutoDataFixed...
Cilium asked 15/6, 2017 at 9:52

3

Solved

I am trying to auto mock ApiController class in my test cases. It worked perfectly when I was using WebApi1. I started to use WebApi2 on the new project and I am getting this exception thrown after...
Felicafelicdad asked 11/11, 2013 at 14:9

2

Using AutoFixture with the AutoFixture.AutoMoq package, I sometimes find tests that weren't configured to correctly test the thing they meant to test, but the problem was never discovered because o...
Abjure asked 3/12, 2015 at 0:23

1

Solved

I'm currently using a test framework I've thrown together using xUnit, AutoMoq, AutoFixture, and AutoFixture.XUnit2. I'm running into issues with mocking methods with generic signatures. AutoFixtu...
Heptangular asked 20/10, 2015 at 23:18

1

Solved

I am using AutoFixture with the AutoMoqCustomization and attempting to create an instance of a class which contains a readonly property thus: public override ILog Logger { get; } = LogManager.GetL...
Forgotten asked 15/10, 2015 at 16:36

3

Solved

I've recently started using AutoFixture+AutoMoq and I'm trying to create an instance of Func<IDbConnection> (i.e., a connection factory). var fixture = new Fixture().Customize(new AutoMoqCus...
Eighth asked 31/7, 2014 at 9:42

1

Solved

The code: IFixture fixture = new Fixture().Customize(new AutoMoqCustomization()); fixture.Customize<ViewDataDictionary>(c => c.Without(x => x.ModelMetadata)); var target = fixture.Crea...
Caslon asked 20/2, 2013 at 17:17
1

© 2022 - 2024 — McMap. All rights reserved.