We are currently using Moles to test code that interacts with a third-party library. The library was not set up for testing very well (hence the need for moles), and the problem I am faced with is that they only publish one abstract class in public. Specific implementations are internal to a third-party library.
The problem that I am facing is that when I try to create an instance of a public type, it requests a specific type from among the moles, but the mole does not generate mole objects for these types, because they are internal.
In the parenting documentation, a way to identify internal elements is to add the InternalsVisibleTo attribute to the AssemblyInfo.cs file. However, this is to expose my internal assembly elements to use moles, as these are third-party libraries with already created assemblies. I do not know how to make their insides visible so that the moth can use them.
In any case, any help would be wonderful. I agree to the integration test, this is the only solution, but I hope that you do not have to go to this issue.
source share