¡@

Home 

c# Programming Glossary: mocks

Best Practices of Test Driven Development Using C# and RhinoMocks [closed]

http://stackoverflow.com/questions/124210/best-practices-of-test-driven-development-using-c-sharp-and-rhinomocks

to mock non virtual methods. c# unit testing tdd rhino mocks share improve this question Definitely a good list. Here.. control allowing you to isolate the object under test with mocks stubs etc. This is how you test objects in isolation. Separate.. possible to unit test a static method class without using mocks. So perhaps this is one of those Rhino Mock specific rules you..

How to start unit testing or TDD?

http://stackoverflow.com/questions/1365943/how-to-start-unit-testing-or-tdd

on what stage I should start writing the unit tests and mocks and how or where to start. Would the preferred way be writing..

When to use mocking versus faking in C# unit testing?

http://stackoverflow.com/questions/1419713/when-to-use-mocking-versus-faking-in-c-sharp-unit-testing

application. There are mainly two types of fakes stubs and mocks . A mock is a fake that you put in place so that the code you..

Why does one use dependency injection? [closed]

http://stackoverflow.com/questions/14301389/why-does-one-use-dependency-injection

testing as it makes it very easy to inject stubs and or mocks . In practice there are things you can not do without a service..

Using IoC for Unit Testing

http://stackoverflow.com/questions/1465849/using-ioc-for-unit-testing

Container be used for unit testing Is it useful to manage mocks in a huge solution 50 projects using IoC Any experiences Any.. it all down to a single Test Double . You can use dynamic mocks like Moq or RhinoMocks to generate the Test Double but it is..

What are the real-world pros and cons of each of the major mocking frameworks?

http://stackoverflow.com/questions/1718463/what-are-the-real-world-pros-and-cons-of-each-of-the-major-mocking-frameworks

using products because of issues. c# .net mocking rhino mocks moq share improve this question I don't know Moles at all..

Mocking a DataReader and getting a Rhino.Mocks.Exceptions.ExpectationViolationException: IDisposable.Dispose(); Expected #0, Actual #1

http://stackoverflow.com/questions/1792984/mocking-a-datareader-and-getting-a-rhino-mocks-exceptions-expectationviolationex

I'm trying to mock a SqlDataReader SqlDataReader reader mocks.CreateMock SqlDataReader Expect.Call reader.Read .Return true.. reader LAT .Return 100 Expect.Call reader LON .Return 100 mocks.ReplayAll but I keep getting a Rhino.Mocks.Exceptions.ExpectationViolationException.. myCities.Add myCity am I missing something c# rhino mocks share improve this question I will suggest you a rewrite..

Rhino Mocks AAA Quick Start?

http://stackoverflow.com/questions/2124175/rhino-mocks-aaa-quick-start

links would be totally appreciated c# unit testing rhino mocks arrange act assert share improve this question I have written..

Tips for writing fluent interfaces in C# 3

http://stackoverflow.com/questions/224730/tips-for-writing-fluent-interfaces-in-c-sharp-3

they read like a natural language. If you look at rhino mocks for example the writing part has been complicated compared to..

Mock static property with moq

http://stackoverflow.com/questions/2416362/mock-static-property-with-moq

String.Empty I do not know how create mocks for static class and property like HttpRuntime.AppDomainAppVirtualPath..

Is it the best practice to extract an interface for every class?

http://stackoverflow.com/questions/3036749/is-it-the-best-practice-to-extract-an-interface-for-every-class

interfaces are useful for a few reasons Test support mocks stubs . Implementation abstraction furthering onto IoC DI ...

unit test with lambda fail using rhino mock

http://stackoverflow.com/questions/4338095/unit-test-with-lambda-fail-using-rhino-mock

c.RegisterSuccess Thank you c# unit testing lambda rhino mocks share improve this question The lambda in your unit test.. error. More here http groups.google.com group rhinomocks browse_frm thread a33b165c16fc48ee tvc 1 share improve this..

Best Practices for IOC Container

http://stackoverflow.com/questions/480286/best-practices-for-ioc-container

when global statics are used. Additionally when supplying mocks for testing I know exactly what mocks it needs and don't have.. when supplying mocks for testing I know exactly what mocks it needs and don't have to mock out an entire container's types...

Mocking Static methods using Rhino.Mocks

http://stackoverflow.com/questions/540239/mocking-static-methods-using-rhino-mocks

would let me accomplish the same c# tdd mocking rhino mocks share improve this question Is it possible to mock a static..

To return IQueryable<T> or not return IQueryable<T>

http://stackoverflow.com/questions/718624/to-return-iqueryablet-or-not-return-iqueryablet

how the repository behaves and my upper layers can use mocks without worrying does the actual repository support this forcing..

Assigning out/ref parameters in Moq

http://stackoverflow.com/questions/1068095/assigning-out-ref-parameters-in-moq

though I can do that in the callback. I know that Rhino Mocks supports this functionality but the project I'm working on is..

Unit testing and checking private variable value

http://stackoverflow.com/questions/1093020/unit-testing-and-checking-private-variable-value

value I am writing unit tests with C# NUnit and Rhino Mocks. Here are the relevant parts of a class I am testing public..

Best Practices of Test Driven Development Using C# and RhinoMocks [closed]

http://stackoverflow.com/questions/124210/best-practices-of-test-driven-development-using-c-sharp-and-rhinomocks

Practices of Test Driven Development Using C# and RhinoMocks closed In order to help my team write testable code I came.. testable. Some of the points refer to limitations of Rhino Mocks a mocking framework for C# but the rules may apply more generally.. methods are difficult or impossible to isolate and Rhino Mocks is unable to mock them. Program off interfaces not classes...

Rhino Mocks - Set a property if a method is called

http://stackoverflow.com/questions/1349364/rhino-mocks-set-a-property-if-a-method-is-called

Mocks Set a property if a method is called Is there a way with Rhino.. property if a method is called Is there a way with Rhino Mocks to set a property of a Stub if a method is called. Something.. code when a stub is called pretty sure it should work with Mocks too. According to the documentation WhenCalled is a replacement..

When to use mocking versus faking in C# unit testing?

http://stackoverflow.com/questions/1419713/when-to-use-mocking-versus-faking-in-c-sharp-unit-testing

you do with an isolation framework like Moq Rhino Mocks Type Mock etc is called a fake . A fake is an object in use..

Unit Testing File I/O

http://stackoverflow.com/questions/1528134/unit-testing-file-i-o

first. I have set up my project to use NUnit and Rhino Mocks and although I understand the concept behind them I'm having.. this question Check out Tutorial to TDD using Rhino Mocks and SystemWrapper . SystemWrapper wraps many of System.IO classes..

What are the real-world pros and cons of each of the major mocking frameworks?

http://stackoverflow.com/questions/1718463/what-are-the-real-world-pros-and-cons-of-each-of-the-major-mocking-frameworks

for and against the major frameworks I've come across RhinoMocks Moq TypeMock Isolator NMock Moles And other usable alternatives.. only mock interfaces and virtual abstract members Rhino Mocks Pros Type safe Full feature set Encourages good design Cons.. was the only option back in 2003 then migrated to Rhino Mocks because of its type safety and now use Moq because of the simpler..

Rhino Mocks AAA Quick Start?

http://stackoverflow.com/questions/2124175/rhino-mocks-aaa-quick-start

Mocks AAA Quick Start I've been looking around for some decent information.. looking around for some decent information on using Rhino Mocks 3.5 with the AAA syntax. I find a lot of blogs that have a mix.. it. Would would be great would be if there were a Rhino Mocks AAA Cheat Sheet like was done for an earlier version. Is it..

What C# mocking framework to use? [closed]

http://stackoverflow.com/questions/37359/what-c-sharp-mocking-framework-to-use

NMock EasyMock.NET TypeMock Isolator Commercial Paid Rhino Mocks Moq NSubstitute JustMock Free version and Commercial Paid version..

unit test with lambda fail using rhino mock

http://stackoverflow.com/questions/4338095/unit-test-with-lambda-fail-using-rhino-mock

userModel.Email .Repeat.Once .Return null Telling me Rhino.Mocks.Exceptions.ExpectationViolationException ISession.Single x x.Email.. the controller . Two different methods are used so Rhino Mocks shows the expectation error. More here http groups.google.com..

Rhino mocks ??change behaviour of stubs

http://stackoverflow.com/questions/630037/rhino-mocks-change-behaviour-of-stubs

otherwise in our tests that another method of using Rhino Mocks. fi.BackToRecord BackToRecordOptions.All fi.Replay share improve..