moles

No Coverage for Moles Tests on x64 Windows Server 2003

本小妞迷上赌 提交于 2019-12-11 15:35:40
问题 For some reason OpenCover is not covering tests using moles on Windows Server 2003 (64bit). I raised a similar question which solved it on my 32bit Windows 7 machine, but for some reason setting the Environment Variable on the Windows Server machine doesn't make a difference. CLRMONITOR_EXTERNAL_PROFILERS: 1542C21D-80C3-45E6-A56C-A9C1E4BEB7B8 Is there a different CLSID for the x64 profiler? Or could this be another problem? Steps to reproduce Create a new project in visual studio with three

Can't reference Microsoft.Moles.Framework.dll in Visual Studio 2010 SP1

家住魔仙堡 提交于 2019-12-11 15:28:05
问题 Actually I already resolved this issue but still I'm not really happy with the way I resolved this issue. I have VS2010 SP1 and I need SP1 to work with Azure SDK. First of all installing Pex and Moles somehow created problems with System.XML.dll. It just disappeared from References in all projects. I had to explicitly find it and connect it to all solutions that used it. Also, there was a bigger issue with Moles itself. TestProjects just weren't able to find Microsoft.Moles.Framework.dll. And

VS2010 pro not able to start Moles host

强颜欢笑 提交于 2019-12-11 13:05:27
问题 We are using Moles framework (0.94.5) to write unit test cases but not able to either debug or run the test cases. System: Win7 64bit Moles: 0.94.5 64bit with VS 2010 pro The solution build successfully. But while trying to run test cases we are getting the following error. { Error 9/6/2013 3:35:32 PM System.InvalidOperationException : Could not start Moles host. Please review the Test Run Errors for more information. //error at Microsoft.Moles.VsHost.Agent.HostTestAdapterDriver

Moles and internal classes

妖精的绣舞 提交于 2019-12-11 11:49:49
问题 We are using Moles currently to test some code that interacts with a 3rd party library. The library was not setup for testing very well (hence the need for moles) and the issue that I am running into is that they only publicly expose a single abstract class. The concrete implementations are internal to the 3rd party library. The issue I am facing is that when trying to create an instance of the public type it is requesting a concrete type from moles, but moles isn't generating moles objects

Moles creation does not create all objects

耗尽温柔 提交于 2019-12-11 07:46:28
问题 While trying to create a mole for some unit tests I noticed that some functions were not being 'moled'. Some functions were appearing in the xxx.moles.xml file while others were not. To resolve this issue, I've tried reinstalling 'Pex and Moles', deleted files in the MolesAssembly folder, restarted the computer, etc. Finally, I simply opened a console window and ran the moles.exe command from the command prompt. "c:\program files\microsoft moles\bin\moles.exe" assembly.dll /op:

Can't generate NHibernate.Moles.dll - build errors in generated code

老子叫甜甜 提交于 2019-12-11 07:39:36
问题 I'm trying to generate a moles assembly for NHibernate.dll using the executable that comes with the download, but the generated code comes with some build errors that I don't know how to fix (if it's even possible). This is what I do: Copy NHibernate.dll and Iesi.Collections.dll to a fresh directory. Standing in that directory, run ../pathtomoles/moles.exe NHibernate.dll Moles then outputs the following: Microsoft Moles v0.94.51023.0 - http://research.microsoft.com/moles - .NET v4.0. 30319

Moles References a .NET 4 Assembly in a .NET 3.5 Project?

扶醉桌前 提交于 2019-12-11 07:27:26
问题 I am using Moles in Visual Studio 2010, and has been working very well. However, in this situation, Moles will not function. The mscorlib.Behaviors assembly references a .NET 4 assembly, even though the project is set to the .NET 3.5 (full) profile. I have a solution originally built in .NET 4, using Visual Studio 2010. The required assemblies (System.ServiceProcess; System.Configuration.Install) function only with the .NET 4 Client Profile. Test projects may only be .NET 4 (full) Profile,

Can't access information from configuration files when tests have host type “Moles”

早过忘川 提交于 2019-12-10 21:25:51
问题 We are having problems accessing information in .net configuration files (such as app.config and web.config) via unit tests when the unit tests have a host type of "Moles". It's causing quite a few headaches, so I hope someone has an idea on what can be done. We're using Visual Studio 2010, and I believe we've tried this on a machine with VS 2010 SP1 installed, and machine without SP1 installed, as well as trying it on 32 bit and 64 bit machines. I've taken the liberty of reducing the test to

Moles/VS2010 SP1 Issue - Error 32, exit code -1002 building mstest with Moles 0.94.51023.0

倖福魔咒の 提交于 2019-12-08 08:50:54
问题 Update 6/20/2011 I can only build the test project once or twice before getting this error. Moles is unusable for me until this is resolved. Deleting obj/bin and closing/reopening visual studio isn't practical. The Error Error 32 The command ""C:\Program Files\Microsoft Moles\bin\moles.exe" @C:\src\qp\mvc3\Solution\QP.Tests.Moles\obj\Debug\Moles\moles.args" exited with code -1002. QP.Tests.Moles The Description Was trying to use moles with nunit but had trouble... so I created a new mstest

Has anyone made moles work properly?

我与影子孤独终老i 提交于 2019-12-07 22:30:28
问题 I was trying to find a consistent description on how to use moles isolation framework but haven't found much on this topic. So far i did the following: Download moles from here (x86 version). Install it. Here guy describes how to use it with custom library. So i added moles assembly for my own library. After rebuild the assembly appeared in references. Then i tried to add using of .Moles namespace and build the project but it failed with bunch of errors. Example with MDateTime didn't work