Pregunta

I am having a problem getting a couple of the static methods in my class to be moled, as well as getting the Diagnostics attribute in the .moles file to be recognized.

My environment:

  • Visual Studio 2008
  • Pex/Moles version 0.94.51023.0

The signature of the one method in particular that I need and can't get a moled reference to:

private static List<MaxBet> GetByPaytableDenom(int? paytableDenomId, int? paytableId, int? denomId, int? instanceId)

I have even tried changing it to public static or private (not static) and recompiled and can't get it to show up at all. It is one of 5 overloaded signatures of the same method. This one and one other aren't getting moled.

So I then tried turning on Diagnostics and Verbosity in my .mole file:

<Moles xmlns="http://schemas.microsoft.com/moles/2010/" Diagnostic="true" Verbosity="Noisy">

And when I check the Output window and select the drop-down box to go to the Moles output, I am only getting this:

-- Moles vs build action build started
adding 2 assemblies
adding C:\WMS_2008\Development 4.X\BugFixes\Main 4.X\SourceNG\TestProjects\UnitTestProjects\BusinessLayerUnitTests\MolesAssemblies\WMS.NG.SSG.BusinessLayer.Moles.dll
adding C:\WMS_2008\Development 4.X\BugFixes\Main 4.X\SourceNG\TestProjects\UnitTestProjects\BusinessLayerUnitTests\MolesAssemblies\WMS.NG.SSG.DataLayer.Moles.dll
-- Moles update finished

What gives? I can't seem to figure this one out.

Cindy

¿Fue útil?

Solución

I know now that the non-static methods show up in the AllInstances property of the moled class.

Thanks, Cindy

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top