Vastra-Gotalandsregionen / oppna-program-deprecated

To oppna-program main page:
http://vastra-gotalandsregionen.github.io/oppna-program/
5 stars 1 forks source link

Mocking framework .NET #59

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Software and Version
********************
FakeItEasy
https://github.com/FakeItEasy/FakeItEasy/wiki

Reason for change
*****************
- Motivation / benefits
Easy mocking framework to use. Arrange,Act,Assert are getting clean. 

- "what´s the business case ?" - is it worth the investment?
The investment cost is small, since it is learned fast by the developers. 
We need a simple mockingframework that doesn't need x lines of code to mock one 
response (like with rhinomocks)

Impacts
*******
- License cost
None

- Education
So easy to use - visit https://github.com/FakeItEasy/FakeItEasy/wiki

- Migration / adaption of existing software
N/A
- Risks
None

Does this replace some existing, already approved, software
***********************************************************
Rhinomocks

Earlier experiences of the suggested software
*********************************************
Used it in one project.

Example
*******

// Creating a fake object is just dead easy!
// No mocks, no stubs, everything's a fake!
var lollipop = A.Fake<ICandy>();
var shop = A.Fake<ICandyShop>();

// To set up a call to return a value is also simple:
A.CallTo(() => shop.GetTopSellingCandy()).Returns(lollipop);

// Use your fake as you would an actual instance of the faked type.
var developer = new SweetTooth();
developer.BuyTastiestCandy(shop);

// Asserting uses the exact same syntax as when configuring calls,
// no need to teach yourself another syntax.
A.CallTo(() => shop.BuyCandy(lollipop)).MustHaveHappened();

Original issue reported on code.google.com by rickard....@gmail.com on 11 Sep 2012 at 7:47

GoogleCodeExporter commented 9 years ago
In respect to our guidelines we decline this request.
http://code.google.com/p/oppna-program/wiki/Governance#Guidelines

We take this decision in respect to used technologies in other projects. 

Decision: Use RhinoMocks for this purpose

Original comment by Hans.Gyl...@gmail.com on 11 Sep 2012 at 10:27