pex

Moling System.dll

徘徊边缘 提交于 2020-01-21 08:59:45
问题 I need to unit test a method that is using the System.Net.WebClient in the System.dll . I tried to Mole the System.dll , but when I tried to compile the project to add references to the System.dll mole, I got a bunch of errors like the following: Error 2 'System.Net.Moles.SFileWebResponse.Dispose(bool)': no suitable method found to override [C:\DGALibrary\DGALib.IO.Tests\obj\x86\Debug\Moles\s\m.g.csproj] C:\DGALibrary\DGALib.IO.Tests\m.g.cs 251374 33 DGALib.IO.Tests Error 3 'System.Net.Moles

'RUN PEX' does not appear on rightclick

て烟熏妆下的殇ゞ 提交于 2020-01-17 03:53:06
问题 I run VS2010 Pro on a Windows XP machine. I have downloaded and installed PEX & Moles. That all went fine. When I open a C#-project and position the cursor on a class method and rightclick, I see no 'run pex' or 'pex' choice, as should be the case according to (install) docu. As far as I could see I have done all by the book, but no joy. It seems I forget something somewhere but what? Who can help me out? 回答1: I have noticed the same functionality when I added a reference to Pex to my project

Can I use PEX with Visual Studio 2012?

送分小仙女□ 提交于 2020-01-13 10:22:44
问题 I don't see any current information about the plans to make Pex work on Visual Studio 2012. 回答1: I've tried to contact Microsoft, but I got no answer. So I decided to email Mary Jo Foley and here is what she got: Here’s your answer from a MS spokesperson on Visual Studio: “ We expect to have an update of Pex compatible with Visual Studio 2012/.NET 4.5 sometime in early 2013. An academic license would be first, a commercial license would come later. ” 回答2: New Pex extension for Visual Studio

Can I use PEX with Visual Studio 2012?

核能气质少年 提交于 2020-01-13 10:22:12
问题 I don't see any current information about the plans to make Pex work on Visual Studio 2012. 回答1: I've tried to contact Microsoft, but I got no answer. So I decided to email Mary Jo Foley and here is what she got: Here’s your answer from a MS spokesperson on Visual Studio: “ We expect to have an update of Pex compatible with Visual Studio 2012/.NET 4.5 sometime in early 2013. An academic license would be first, a commercial license would come later. ” 回答2: New Pex extension for Visual Studio

C# Static Analysis, possible values for a variable/parameter

拥有回忆 提交于 2020-01-12 03:24:07
问题 In code similar to each of the following examples, I would like to be able to statically analyze code to determine the list of possible values that are passed into SpecialFunction(). SpecialFunction(5); // A int x = 5; SpecialFunction(x); // B int x = 5; x = condition ? 3 : 19; SpecialFunction(x); // C I can already parse the C# into an abstract syntax tree and I can already handle cases like A, and I guess I could keep track of initial assignments of values to guess case B, but cases as easy

Is Pex and Moles project still active?

余生颓废 提交于 2020-01-03 18:30:51
问题 They used to release a two new versions a month but since October 2010 they haven't released a new one. I've found this. But the fact they have closed its support forum on MSDN makes me suspect the project is not going forward. We are using it for our current project, but we are thinking to replace it for another framework before it is too late. 回答1: We (the Pex team) has been quite busy working on productizing Moles. This will bring some changes to how things work internally, which has been

Contract.Requires throwing pex errors [duplicate]

旧城冷巷雨未停 提交于 2020-01-01 23:12:25
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: How Do You Configure Pex to Respect Code Contracts? Currently, when I run a pex exploration, the code contracts I created in my classes are being treated as errors in the pex exploration results. I thought when you ran pex exploration using code contracts the contract failures should be treated as expected behavior. Here is the code causing the exceptions. Test Method: [PexMethod] public void TestEquality(Guid

NCover 1.5.8 with Moles/Pex and NUnit

给你一囗甜甜゛ 提交于 2019-12-23 05:19:33
问题 I'm having trouble getting the following to work together. NCover 1.5.8 (the version shipped with TestDriven.NET) NUnit 2.5 (the version shipped with TestDriven.NET) Moles and Pex I'm using Windows 7 x64 with a .NET 4.0 Pex and Moles test library I have tried to follow tips from this similar question (about getting Moles to work with MSTest) and related links. I did manage to get Moles and NUnit to work together thanks to this answer, but I cannot get it to work with NCover. Here's a batch

Is Pex (Test generation) really useful tool?

风格不统一 提交于 2019-12-20 08:18:13
问题 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 from classic Beck's tdd book: [Test] public void ShouldRoundOnCreation() { Money money = new Money(20.678); Assert.AreEqual(20.68,money.Amount); Assert.AreEqual(2068,money.Cents); } Can this test be generated? No :) 95 % of tests in my projects check business logic, and can not be generated. Pex

Running Pex with .NET 3.5 projects

为君一笑 提交于 2019-12-13 07:40:22
问题 I'm currently trying to use Pex and Moles with a SharePoint 2010 solution that's written in .NET 3.5. When adding a test project (by using Pex -> Create parameterized tests) everything seems to work OK. However, when I try to compile I end up with a massive list of errors (missing namespaces and such) and warnings regarding referenced assemblies not being able to be resolved (such as System.Web which under .NET 4 is no single DLL anymore). This is due to the projects under test is .NET 3.5