English 中文(简体)
不包括编组中的档案,不作 mo
原标题:Excluding files in assembly from being moled
  • 时间:2011-10-19 04:41:18
  •  标签:
  • moles
  • pex

我正在利用 mo子为我的团队使用的遗产法典制作模拟课程。 是否可能将议会中的某些阶层排除在外,使其不受骚扰? 在我想要排除的遗产法典中,一些汽车制造的行业,我遇到了许多错误。

问题回答

为了将各种类型排除在烟雾/分子的生成之外,你需要修改用于你的组装的分子档案。 虽然参考手册的“Type Filtering”部分仅介绍了StubGeneration/code>要素,但还有MoleGeneration要素,这些要素同样运作,但管理分子的生成。

To exclude a type from stub and mole generation specify the type name in a Remove element so that the .moles file for your assembly looks like this:

<Moles xmlns="http://schemas.microsoft.com/moles/2010/" Diagnostic="true">
    <Assembly Name="your_assembly" />
    <StubGeneration>
        <Types>
            <Remove FullName="Your.Type.Full.Name!" />
        </Types>
    </StubGeneration>
    <MoleGeneration>
        <Types>
            <Remove FullName="Your.Type.Full.Name!" />
        </Types>
    </MoleGeneration>
</Moles>

在这里,如何使只为1类(<代码>)制造 st和 mo。 页: 1

<Moles xmlns="http://schemas.microsoft.com/moles/2010/" Diagnostic="true">
    <Assembly Name="your_assembly" />
    <StubGeneration>
        <Types>
            <Clear />
            <Add FullName="Your.Type.Full.Name!" />
        </Types>
    </StubGeneration>
    <MoleGeneration>
        <Types>
            <Clear />
            <Add FullName="Your.Type.Full.Name!" />
        </Types>
    </MoleGeneration>
</Moles>




相关问题
workaround pex internal class

Is there any way to make pex work when the classes under test are internal? how about sealed classes? I mean after all this type of tool is really good for API testing, you are likely to want to keep ...

Why Pex is not massive [closed]

Hi there: I was looking at a few videos, etc and I just cant help but wonder why Pex usage seems to be so low? Are there any problems that are not obvious, or is it just a licence issue?

Is Pex (Test generation) really useful tool?

Yes, it is possible to generate tests on boundary values for functions like "Sum" or "Divide". Pex is a good tool here. But more often we create tests on business behaviour. Let s consider example ...

How to add [assembly: PexLinqPackage] to a test project

I am trying to get Pex to work with linq in my project. I got this explanation on what I need to do: In order for Pex to support Linq, make sure you add a reference to Microsoft.Pex.Linq.dll and add ...

C# - What does "" equate to?

I am playing with Pex and one of the parameters it passes into my method is "". What does that mean? My guess is an empty string ("") based on the content of my method. However, if it is the same ...

Can Moles be used to create a sealed class?

I am trying to mock my Linq To SQL classes. I have the following code: IQueryable<User> vUser = (from aUser in _ctx.Users where aUser.UserName == userName select aUser); ...

How to use PEX with NUnit tests in VS 2010?

I am aware that the current release of PEX allows use with the NUnit framework. The thing is I can t configure it to use the NUnit framework. In the Options -> PEX: What Exactly do i have to put in ...