I am currently using a test environment that I have selected using xUnit, AutoMoq, AutoFixture and AutoFixture.XUnit2. I am facing problems with bullying methods with common signatures.
AutoFixture seems to do a great job with the overall details. If I ask CustomeObject<Task<List<Task<string>>>> or some other ridiculous nested generic type, it seems to generate them as expected, right down to the last node.
However, if I have an interface like this:
public interface ITestInterface{ T Get<T>(); }
and then try calling the method from the layout I got from AutoMoq, it just returns null. So for example:
[Theory] [MyAutoDaqaAttribute] public async Task ATest( Mock<ITestInterface> service ) { var result = service.Object.Get<string>(); }
As a result, the code will be zero. It seems strange to me. Should I go to auto-alignment and try to create a value of type T, i.e. New line? It looks like Autofixture has already shown that it can do a great job with generics.
Or do you always need to manually configure some mock method that has a common signature?
source share