You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@reef.apache.org by Anupam <an...@gmail.com> on 2015/09/05 00:54:33 UTC

Mocking framework for REEF .NET code

I am writing some code in .NET parts of REEF. I was looking for existing
use of a mocking framework to write my tests against, but could not find
any.

In case my assessment above is correct I would like to propose we use
NSubstitute.

Some of the other frameworks I have considered:
MS Fakes : Requires Visual Studio Professional edition or above
Moq: License -> BSD; Consumption -> NuGet; Active development.
RhinoMocks: License -> BSD; Consumption -> NuGet; No new published NuGet in
a long time.
NSubstitute: License -> BSD; Consumption -> NuGet; Active development.

Syntax comparison:
http://dennis-nerush.blogspot.com/2012/10/rhino-mocks-vs-moq-vs-nsubstitute.html
http://weareadaptive.com/blog/2014/09/30/why-nsubstitute/

I prefer the fluent interface provided by extension methods in NSusbtitute
over lambdas used in Moq and FakeItEasy. NSubstitute has a small set of
features so ramp-up is easy. ReSharper code generation works well with
NSubstitute.

I don't see much of a difference between Moq, NSubstitute and FakeItEasy
otherwise.

If there is any other mocking framework of choice please share.

-- 
Anupam

Re: Mocking framework for REEF .NET code

Posted by Anupam <an...@gmail.com>.
Fakes : Requires Visual Studio Professional edition or above

On Friday, September 4, 2015, Boris Shulman <sh...@gmail.com> wrote:

> What about fakes framework that is part of visual studio?
>
> -----Original Message-----
> From: "Anupam" <anupam128@gmail.com <javascript:;>>
> Sent: ‎9/‎4/‎2015 3:55 PM
> To: "dev@reef.incubator.apache.org <javascript:;>" <
> dev@reef.incubator.apache.org <javascript:;>>
> Subject: Mocking framework for REEF .NET code
>
> I am writing some code in .NET parts of REEF. I was looking for existing
> use of a mocking framework to write my tests against, but could not find
> any.
>
> In case my assessment above is correct I would like to propose we use
> NSubstitute.
>
> Some of the other frameworks I have considered:
> MS Fakes : Requires Visual Studio Professional edition or above
> Moq: License -> BSD; Consumption -> NuGet; Active development.
> RhinoMocks: License -> BSD; Consumption -> NuGet; No new published NuGet in
> a long time.
> NSubstitute: License -> BSD; Consumption -> NuGet; Active development.
>
> Syntax comparison:
>
> http://dennis-nerush.blogspot.com/2012/10/rhino-mocks-vs-moq-vs-nsubstitute.html
> http://weareadaptive.com/blog/2014/09/30/why-nsubstitute/
>
> I prefer the fluent interface provided by extension methods in NSusbtitute
> over lambdas used in Moq and FakeItEasy. NSubstitute has a small set of
> features so ramp-up is easy. ReSharper code generation works well with
> NSubstitute.
>
> I don't see much of a difference between Moq, NSubstitute and FakeItEasy
> otherwise.
>
> If there is any other mocking framework of choice please share.
>
> --
> Anupam
>


-- 
Anupam
Bellevue, WA
Ph: +1 (425)-777-5570

RE: Mocking framework for REEF .NET code

Posted by Boris Shulman <sh...@gmail.com>.
What about fakes framework that is part of visual studio?

-----Original Message-----
From: "Anupam" <an...@gmail.com>
Sent: ‎9/‎4/‎2015 3:55 PM
To: "dev@reef.incubator.apache.org" <de...@reef.incubator.apache.org>
Subject: Mocking framework for REEF .NET code

I am writing some code in .NET parts of REEF. I was looking for existing
use of a mocking framework to write my tests against, but could not find
any.

In case my assessment above is correct I would like to propose we use
NSubstitute.

Some of the other frameworks I have considered:
MS Fakes : Requires Visual Studio Professional edition or above
Moq: License -> BSD; Consumption -> NuGet; Active development.
RhinoMocks: License -> BSD; Consumption -> NuGet; No new published NuGet in
a long time.
NSubstitute: License -> BSD; Consumption -> NuGet; Active development.

Syntax comparison:
http://dennis-nerush.blogspot.com/2012/10/rhino-mocks-vs-moq-vs-nsubstitute.html
http://weareadaptive.com/blog/2014/09/30/why-nsubstitute/

I prefer the fluent interface provided by extension methods in NSusbtitute
over lambdas used in Moq and FakeItEasy. NSubstitute has a small set of
features so ramp-up is easy. ReSharper code generation works well with
NSubstitute.

I don't see much of a difference between Moq, NSubstitute and FakeItEasy
otherwise.

If there is any other mocking framework of choice please share.

-- 
Anupam

Re: Mocking framework for REEF .NET code

Posted by Markus Weimer <ma...@weimo.de>.
On 2015-09-04 17:50, Anupam wrote:
>> One dimension would be if either of these support the open source 
>> .NETexplicitly.
> 
> I don't understand what that means.

If either of those claim special support for .NET Core / CoreCLR or are
used by those OSS projects, that would be something to consider, right?

Markus

Re: Mocking framework for REEF .NET code

Posted by Anupam <an...@gmail.com>.
*MW: One dimension would be if either of these support the open source
.NETexplicitly.*

I don't understand what that means.


On 4 September 2015 at 17:03, Markus Weimer <ma...@weimo.de> wrote:

> Hi,
>
> given that we haven't chosen one, you have dibs :-) As long as the
> license is compatible, I don't see a reason to favor one over the other
> in the abstract.
>
> One dimension would be if either of these support the open source .NET
> explicitly.
>
> Markus
>
>
> On 2015-09-04 15:54, Anupam wrote:
> > I am writing some code in .NET parts of REEF. I was looking for existing
> > use of a mocking framework to write my tests against, but could not find
> > any.
> >
> > In case my assessment above is correct I would like to propose we use
> > NSubstitute.
> >
> > Some of the other frameworks I have considered:
> > MS Fakes : Requires Visual Studio Professional edition or above
> > Moq: License -> BSD; Consumption -> NuGet; Active development.
> > RhinoMocks: License -> BSD; Consumption -> NuGet; No new published NuGet
> in
> > a long time.
> > NSubstitute: License -> BSD; Consumption -> NuGet; Active development.
> >
> > Syntax comparison:
> >
> http://dennis-nerush.blogspot.com/2012/10/rhino-mocks-vs-moq-vs-nsubstitute.html
> > http://weareadaptive.com/blog/2014/09/30/why-nsubstitute/
> >
> > I prefer the fluent interface provided by extension methods in
> NSusbtitute
> > over lambdas used in Moq and FakeItEasy. NSubstitute has a small set of
> > features so ramp-up is easy. ReSharper code generation works well with
> > NSubstitute.
> >
> > I don't see much of a difference between Moq, NSubstitute and FakeItEasy
> > otherwise.
> >
> > If there is any other mocking framework of choice please share.
> >
>



-- 
Anupam

Re: Mocking framework for REEF .NET code

Posted by Markus Weimer <ma...@weimo.de>.
Hi,

given that we haven't chosen one, you have dibs :-) As long as the
license is compatible, I don't see a reason to favor one over the other
in the abstract.

One dimension would be if either of these support the open source .NET
explicitly.

Markus


On 2015-09-04 15:54, Anupam wrote:
> I am writing some code in .NET parts of REEF. I was looking for existing
> use of a mocking framework to write my tests against, but could not find
> any.
> 
> In case my assessment above is correct I would like to propose we use
> NSubstitute.
> 
> Some of the other frameworks I have considered:
> MS Fakes : Requires Visual Studio Professional edition or above
> Moq: License -> BSD; Consumption -> NuGet; Active development.
> RhinoMocks: License -> BSD; Consumption -> NuGet; No new published NuGet in
> a long time.
> NSubstitute: License -> BSD; Consumption -> NuGet; Active development.
> 
> Syntax comparison:
> http://dennis-nerush.blogspot.com/2012/10/rhino-mocks-vs-moq-vs-nsubstitute.html
> http://weareadaptive.com/blog/2014/09/30/why-nsubstitute/
> 
> I prefer the fluent interface provided by extension methods in NSusbtitute
> over lambdas used in Moq and FakeItEasy. NSubstitute has a small set of
> features so ramp-up is easy. ReSharper code generation works well with
> NSubstitute.
> 
> I don't see much of a difference between Moq, NSubstitute and FakeItEasy
> otherwise.
> 
> If there is any other mocking framework of choice please share.
>