I am using moles to generate mock classes for the legacy code my team uses. Is it possible to exclude certain classes in the assembly from being moled? I am getting a lot of errors for some autogenerated classes we have in the legacy code which I want to exclude from being moled.
Excluding files in assembly from being moled
949 Views Asked by user1002419 At
1
There are 1 best solutions below
Related Questions in MOLES
- Unit Testing Scheduler in the FUTURE C#
- How can I use Moles to check a DataContext's changes
- VS2010 pro not able to start Moles host
- How to pass GUID as a Pex argument in pex
- Moles: Mole a ReadOnly Shared/Static Property
- MoledTypeAttribute on specific type generates moles and stubs for all types in the target type's assembly
- Object.GetType throws NullReferenceExceptions
- Moles + SPGroupcollection issue
- Unit testing and DB isolation via pex and moles
- Unable to mole clasess which use new keyword in inherited methods
- Can't access information from configuration files when tests have host type "Moles"
- Moles crashing when unit test debugging is being stopped
- Moles hosting unable to resolve dependent assembly
- How to Mole an instance field?
- How to mole the GetEnumerator method for SPJobDefinitionCollection
Related Questions in PEX
- Configure intellitest to use just the one test project in Visual Studio 2015 RC
- Recording EVERY test scenario run using intelliTest in Visual Studio 2015 RC
- Visual Studio 2015 RC Pex creates tests for public methods only
- Continue Pex run in Visual Studio 2015 RC intellitest till dynamic coverage block numbers match
- Pex: How to obtain all Path Conditions (PC)?
- PEX/Intellitest: is possible to deal with Dictionary as symbolic input?
- How do I generate "Smart Unit Tests" with Visual Studio 2015 Preview?
- Use of Microsoft Pex with Prism composite application
- Code Contracts failing example Graph.Remove(Edge e)
- PexAssert.Throws in PUT in combination with Run Pex
- Visibility issues with Pex
- How to pass GUID as a Pex argument in pex
- How to define a set of input parameters in Pex?
- Moles v0.94 Causing Tests To Ignore Config File
- Object.GetType throws NullReferenceExceptions
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
To include and exclude types from stub/mole generation, you need to modify the .moles file for your assembly. Although the section "Type Filtering" of the reference manual describes only the
StubGenerationelement, there is also theMoleGenerationelement which works similarly but manages mole generation.To exclude a type from stub and mole generation specify the type name in a
Removeelement so that the .moles file for your assembly looks like this:Here's how to enable stub and mole generation only for one class
Your.Type.Full.Name: