moles Questions

3

Solved

Moles is an isolation framework created by Microsoft. A cool feature of Moles is that it can "mock" static/non-virtual methods and sealed classes (which is not possible with frameworks like Moq). B...
Vyatka asked 11/6, 2010 at 9:52

4

I am looking for mocking the azure storage transactions using Moles Mocking framework. Any thoughts/documentation/samples on how to mock the azure storage transactions using Moles or may be any ot...
Crifasi asked 20/1, 2013 at 18:38

4

Solved

I'm trying to mole System.ServiceModel v4 in VS 2010 SP1 with Moles 0.94.51023.0 and I keep getting the following errror: The type or namespace name 'IHttpCookieContainerManager' does not exist in ...
Proprietress asked 12/5, 2011 at 15:3

2

Solved

When I began using Microsoft Fakes, I was excited to start shimming some .NET methods. I was lead to believe that I would be able to shim ANY .NET method, static or not: http://msdn.microsoft.com/e...
Alrich asked 22/4, 2013 at 18:31

1

Solved

So I am interested in the way that it is implemented. Basically: How can I re-implement the same thing myself? ... which I am not intending to do. Just understand. The fundamental question is: How...
Smallclothes asked 13/8, 2014 at 8:46

1

I am using VS2010 with SP1 (also have VS2012 installed on the same machine). Moles 1.0 The project is using .NET 4 I added moles assembly to system.dll and get the following error on compile Erro...
Herzig asked 28/10, 2012 at 17:55

2

Solved

When it comes to testing I've backed into it. I'm now a huge fan, and often do something like TDD. In VS 2010 for design and regressions I've just used MSTEST. This is great - all my projects are o...
Quince asked 24/11, 2012 at 1:50

6

Solved

I have the folowing tests: [TestClass] public class GeneralTest { [TestMethod] public void VerifyAppDomainHasConfigurationSettings() { string value = ConfigurationManager.AppSettings["TestValu...
Lightly asked 5/11, 2010 at 11:54

2

Solved

I have been recently working with Moles and I am now switching to Fakes. In my old test project I had a test setup, which looked like this: [TestInitialize] public void Setup() { //... } In the...
Easting asked 18/8, 2012 at 10:12

3

Solved

I am attempting to compile an existing project (targets .NET4) developed in Visual Studio 2010 and now testing migration to VS2012. When I compile my existing project with moles, I get the followi...
Connaught asked 25/7, 2012 at 10:16

3

Solved

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...
Higginson asked 2/2, 2012 at 17:47

1

Solved

Method I am unit testing checks for a session variable like if(Session["somevar"] != null) { // rest of the code } In my test, not able to get rid of this since Session is null, it's throwing n...
Hysterics asked 13/12, 2011 at 10:41

1

Solved

I wanted to bypass an internal method call and hence have mocked it. The mocked method delegate looks like: public Microsoft.Moles.Framework.MolesDelegates.OutOutFunc<string,string,string, byte...
Coetaneous asked 12/12, 2011 at 10:27

1

I'm trying to use Pex to test some code. I have an abstract class with four concrete implementations. I have created factory methods for each of the four concrete types. I had also created one for ...
Axiomatic asked 21/9, 2011 at 18:49

1

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 in...
Manvel asked 11/11, 2011 at 22:36

2

Solved

I have a class like this: public class Product : IProduct { static private string _defaultName = "default"; private string _name; private float _price; /// Constructor public Product() { _p...
Moscow asked 16/5, 2011 at 9:7

1

Moles can be used in two ways: Manually Including [assembly: MoledType(typeof(_type_to_instrument))] Specify [HostType("Moles")] Call Microsoft.Moles.Framework.Moles.MoleRuntime.SetMole(Delegate...
Umbelliferous asked 7/6, 2011 at 22:12

1

Solved

I'm starting to using Moles in unit tests and am struggling a little with documentation. I want to mole DateTime.Now. If you look around the old way of doing this was to add a reference to mscorl...
Ginsberg asked 11/5, 2011 at 9:24

3

Solved

My company is trying to decide if we are going to standardize on Moq, Rhino Mocks or MS Moles and Stubs. I know Rhino Mocks and Moles and Stubs fairly well. But I am unfamiliar with Moq. How does ...
Frugivorous asked 14/9, 2010 at 20:50

2

Solved

I am working with Moles and mocking a System.Data.Linq.Table. I got it constructing fine, but when I use it, it wants IQueryable.Provider to be mocked (moled) as well. I just want it to use norma...
Heiney asked 11/2, 2010 at 17:13
1

© 2022 - 2024 — McMap. All rights reserved.