I may doing something wrong but can't find the answer.
It seems that line
var searchFake = A.Fake<Search>();
should simply work. But it always gives me the error
Constructor with signature () failed: No usable default constructor was found on the type Amazon.DynamoDBv2.DocumentModel.Search.
While Search type actually has internal parameterless constructor and I simply could create instance of this type with the next code:
var constructor = typeof(Search).GetConstructors(BindingFlags.NonPublic |
BindingFlags.Instance).Single(c => c.GetParameters().Length == 0);
var instance = Activator.CreateInstance(typeof(Search), nonPublic: true)
as Search;
Why FakeItEasy unable to do so or what I'm doing wrong here?