Skip to content

Commit fd49e75

Browse files
committed
Add support for FakeItEasy
1 parent 5f51f76 commit fd49e75

File tree

51 files changed

+30905
-16033
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+30905
-16033
lines changed

Ninject.MockingKernel with Silverlight Unittesting.sln

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 2013
4-
VisualStudioVersion = 12.0.30723.0
4+
VisualStudioVersion = 12.0.31101.0
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{19E2834E-3CD3-420D-ADE1-FC9A75E67E04}"
77
ProjectSection(SolutionItems) = preProject
@@ -17,15 +17,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ninject.MockingKernel.Moq",
1717
EndProject
1818
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ninject.MockingKernel.Moq.Test", "src\Ninject.MockingKernel.Moq.Test\Ninject.MockingKernel.Moq.Test.csproj", "{3644F8BE-C266-4236-813C-B7056E91200B}"
1919
EndProject
20-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ninject.MockingKernel.RhinoMocks", "src\Ninject.MockingKernel.RhinoMock\Ninject.MockingKernel.RhinoMocks.csproj", "{A5C663D7-2943-4BF4-9B08-567FA04CC3AD}"
21-
EndProject
22-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ninject.MockingKernel.RhinoMocks.Test", "src\Ninject.MockingKernel.RhinoMock.Test\Ninject.MockingKernel.RhinoMocks.Test.csproj", "{8BD4FA63-ACBA-430F-80FB-DA86AAF53F58}"
23-
EndProject
2420
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ninject.MockingKernel.SilverlightTests", "src\Ninject.MockingKernel.SilverlightTests\Ninject.MockingKernel.SilverlightTests.csproj", "{949002CF-F181-4E7C-B8A1-8233A2159074}"
2521
EndProject
26-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ninject.MockingKernel.NSubstitute", "src\Ninject.MockingKernel.NSubstitute\Ninject.MockingKernel.NSubstitute.csproj", "{5C36A6ED-BFD9-4181-96ED-FED4D0E1E6F5}"
22+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ninject.MockingKernel.FakeItEasy", "src\Ninject.MockingKernel.FakeItEasy\Ninject.MockingKernel.FakeItEasy.csproj", "{6C2C9465-A2FE-46B8-8537-4A81FEEFFB37}"
2723
EndProject
28-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ninject.MockingKernel.NSubstitute.Test", "src\Ninject.MockingKernel.NSubstitute.Test\Ninject.MockingKernel.NSubstitute.Test.csproj", "{DFCD85F9-31D7-4DDF-BEBE-5287B727AF37}"
24+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ninject.MockingKernel.FakeItEasy.Test", "src\Ninject.MockingKernel.FakeItEasy.Test\Ninject.MockingKernel.FakeItEasy.Test.csproj", "{026CDA2C-BC44-4F2E-A6AD-EC41B74FA4FD}"
2925
EndProject
3026
Global
3127
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -49,26 +45,18 @@ Global
4945
{3644F8BE-C266-4236-813C-B7056E91200B}.Debug|Any CPU.Build.0 = Debug|Any CPU
5046
{3644F8BE-C266-4236-813C-B7056E91200B}.Release|Any CPU.ActiveCfg = Release|Any CPU
5147
{3644F8BE-C266-4236-813C-B7056E91200B}.Release|Any CPU.Build.0 = Release|Any CPU
52-
{A5C663D7-2943-4BF4-9B08-567FA04CC3AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
53-
{A5C663D7-2943-4BF4-9B08-567FA04CC3AD}.Debug|Any CPU.Build.0 = Debug|Any CPU
54-
{A5C663D7-2943-4BF4-9B08-567FA04CC3AD}.Release|Any CPU.ActiveCfg = Release|Any CPU
55-
{A5C663D7-2943-4BF4-9B08-567FA04CC3AD}.Release|Any CPU.Build.0 = Release|Any CPU
56-
{8BD4FA63-ACBA-430F-80FB-DA86AAF53F58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
57-
{8BD4FA63-ACBA-430F-80FB-DA86AAF53F58}.Debug|Any CPU.Build.0 = Debug|Any CPU
58-
{8BD4FA63-ACBA-430F-80FB-DA86AAF53F58}.Release|Any CPU.ActiveCfg = Release|Any CPU
59-
{8BD4FA63-ACBA-430F-80FB-DA86AAF53F58}.Release|Any CPU.Build.0 = Release|Any CPU
6048
{949002CF-F181-4E7C-B8A1-8233A2159074}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
6149
{949002CF-F181-4E7C-B8A1-8233A2159074}.Debug|Any CPU.Build.0 = Debug|Any CPU
6250
{949002CF-F181-4E7C-B8A1-8233A2159074}.Release|Any CPU.ActiveCfg = Release|Any CPU
6351
{949002CF-F181-4E7C-B8A1-8233A2159074}.Release|Any CPU.Build.0 = Release|Any CPU
64-
{5C36A6ED-BFD9-4181-96ED-FED4D0E1E6F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
65-
{5C36A6ED-BFD9-4181-96ED-FED4D0E1E6F5}.Debug|Any CPU.Build.0 = Debug|Any CPU
66-
{5C36A6ED-BFD9-4181-96ED-FED4D0E1E6F5}.Release|Any CPU.ActiveCfg = Release|Any CPU
67-
{5C36A6ED-BFD9-4181-96ED-FED4D0E1E6F5}.Release|Any CPU.Build.0 = Release|Any CPU
68-
{DFCD85F9-31D7-4DDF-BEBE-5287B727AF37}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
69-
{DFCD85F9-31D7-4DDF-BEBE-5287B727AF37}.Debug|Any CPU.Build.0 = Debug|Any CPU
70-
{DFCD85F9-31D7-4DDF-BEBE-5287B727AF37}.Release|Any CPU.ActiveCfg = Release|Any CPU
71-
{DFCD85F9-31D7-4DDF-BEBE-5287B727AF37}.Release|Any CPU.Build.0 = Release|Any CPU
52+
{6C2C9465-A2FE-46B8-8537-4A81FEEFFB37}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
53+
{6C2C9465-A2FE-46B8-8537-4A81FEEFFB37}.Debug|Any CPU.Build.0 = Debug|Any CPU
54+
{6C2C9465-A2FE-46B8-8537-4A81FEEFFB37}.Release|Any CPU.ActiveCfg = Release|Any CPU
55+
{6C2C9465-A2FE-46B8-8537-4A81FEEFFB37}.Release|Any CPU.Build.0 = Release|Any CPU
56+
{026CDA2C-BC44-4F2E-A6AD-EC41B74FA4FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
57+
{026CDA2C-BC44-4F2E-A6AD-EC41B74FA4FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
58+
{026CDA2C-BC44-4F2E-A6AD-EC41B74FA4FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
59+
{026CDA2C-BC44-4F2E-A6AD-EC41B74FA4FD}.Release|Any CPU.Build.0 = Release|Any CPU
7260
EndGlobalSection
7361
GlobalSection(SolutionProperties) = preSolution
7462
HideSolutionNode = FALSE
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<project name="Ninject" default="build">
3+
<target name="buildFakeItEasy" unless="${string::contains(build.platform, 'silverlight-4.0')}">
4+
<property name="product.assembly.FakeItEasy" value="${product.name}.FakeItEasy.dll" overwrite="false"/>
5+
<property name="product.docfile.FakeItEasy" value="${product.name}.FakeItEasy.xml" overwrite="false"/>
6+
7+
<property name="packagepath.FakeItEasy" value="FakeItEasy.*/lib/NET35" unless="${string::contains(build.platform, 'silverlight') or string::contains(build.platform, 'net-4.')}"/>
8+
<property name="packagepath.FakeItEasy" value="FakeItEasy.*/lib/NET40" unless="${string::contains(build.platform, 'silverlight')}" if="${string::contains(build.platform, 'net-4.')}"/>
9+
<property name="packagepath.FakeItEasy" value="FakeItEasy.*/lib/SL50" if="${string::contains(build.platform, 'silverlight')}" />
10+
<property name="current.path.lib.FakeItEasy" value="${path.packages}/${packagepath.FakeItEasy}"/>
11+
12+
<copy todir="${path.packages}/lib">
13+
<fileset basedir="${path.packages}">
14+
<include name="${packagepath.FakeItEasy}/*.dll"/>
15+
<include name="${packagepath.FakeItEasy}/*.xml"/>
16+
</fileset>
17+
</copy>
18+
<csc noconfig="true" nostdlib="true" warnaserror="true" target="library" debug="${build.debug}" optimize="${build.optimize}" define="${build.defines}"
19+
output="${current.path.build}/${product.assembly.FakeItEasy}" doc="${current.path.build}/${product.docfile.FakeItEasy}" keyfile="${path.src}/${product.keyfile}">
20+
<arg line="/filealign:512"/>
21+
<sources basedir="${path.src}">
22+
<include name="${build.asminfo}"/>
23+
<include name="${product.name}.FakeItEasy/**/*.cs"/>
24+
</sources>
25+
<references>
26+
<include name="mscorlib.dll"/>
27+
<include name="System.dll"/>
28+
<include name="System.Core.dll"/>
29+
<include name="${current.path.build}/${product.assembly}"/>
30+
<include name="${path.lib}/Ninject/${build.platform}/Ninject.dll"/>
31+
<include name="${current.path.lib.FakeItEasy}/FakeItEasy.dll"/>
32+
</references>
33+
</csc>
34+
</target>
35+
36+
37+
<target name="nuget-FakeItEasy">
38+
<property name="nuget.sourcedir" value="${path.base}/nuget-FakeItEasy" />
39+
<property name="nuget.basedir" value="${path.base}/build/nuget-FakeItEasy" />
40+
<property name="nuget.platforms" value="${product.platforms}" />
41+
<property name="nuget.name" value="${product.name}.FakeItEasy" />
42+
<property name="nuget.releaseDirectory" value="${path.build}\${build.platform}\release" dynamic="true"/>
43+
<property name="nuget.dependencies" value="Ninject.MockingKernel" />
44+
<property name="nuget.additionalFiles" value="-" />
45+
<property name="nuget.packageName" value="${nuget.name}${product.packagePostfix}" />
46+
<property name="nuget.symbol.basedir" value="${path.base}/build/nuget-FakeItEasy_symbol" />
47+
<property name="nuget.project" value="${path.src}/${product.name}.FakeItEasy/${product.name}.FakeItEasy.csproj" />
48+
49+
<property name="nant.settings.currentframework" value="net-4.0"/>
50+
<msbuild project="${nuget.project}" />
51+
<call target="nuget-run"/>
52+
</target>
53+
</project>

Ninject.MockingKernel.build

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@
1414
<include buildfile="Ninject.MockingKernel.Moq.build" />
1515
<include buildfile="Ninject.MockingKernel.RhinoMocks.build" />
1616
<include buildfile="Ninject.MockingKernel.NSubstitute.build" />
17+
<include buildfile="Ninject.MockingKernel.FakeItEasy.build" />
1718

1819
<target name="all" depends="core test silverlight-test"/>
19-
<target name="nuget-all" depends="nuget nuget-moq nuget-RhinoMocks nuget-NSubstitute"/>
20+
<target name="nuget-all" depends="nuget nuget-moq nuget-RhinoMocks nuget-NSubstitute nuget-FakeItEasy"/>
2021

21-
<target name="core" depends="init buildCore buildMoq buildRhinoMocks buildNSubstitute" />
22+
<target name="core" depends="init buildCore buildMoq buildRhinoMocks buildNSubstitute buildFakeItEasy" />
2223

2324
<target name="buildCore" depends="init">
2425
<csc noconfig="true" nostdlib="true" warnaserror="true" target="library" debug="${build.debug}" optimize="${build.optimize}" define="${build.defines}"
@@ -53,15 +54,18 @@
5354
<include name="${product.name}.Moq.Test/**/*.cs"/>
5455
<include name="${product.name}.RhinoMock.Test/**/*.cs" unless="${string::contains(build.platform, 'mono')}"/>
5556
<include name="${product.name}.NSubstitute.Test/**/*.cs"/>
57+
<include name="${product.name}.FakeItEasy.Test/**/*.cs"/>
5658
<exclude name="${product.name}.Moq.Test/Properties/*.cs"/>
5759
<exclude name="${product.name}.RhinoMock.Test/Properties/*.cs" unless="${string::contains(build.platform, 'mono')}"/>
5860
<exclude name="${product.name}.NSubstitute.Test/Properties/*.cs"/>
61+
<exclude name="${product.name}.FakeItEasy.Test/Properties/*.cs"/>
5962
</sources>
6063
<references basedir="${current.path.test}">
6164
<include name="mscorlib.dll"/>
6265
<include name="System.dll"/>
6366
<include name="System.Core.dll"/>
6467
<include name="Moq.dll"/>
68+
<include name="FakeItEasy.dll"/>
6569
<include name="Rhino.Mocks.dll"/>
6670
<include name="NSubstitute.dll"/>
6771
<include name="xunit.dll"/>
@@ -70,6 +74,7 @@
7074
<include name="${product.assembly.moq}"/>
7175
<include name="${product.assembly.rhinomock}" unless="${string::contains(build.platform, 'mono')}"/>
7276
<include name="${product.assembly.nsubstitute}"/>
77+
<include name="${product.assembly.FakeItEasy}"/>
7378
<include name="${path.lib}/Ninject/${build.platform}/Ninject.dll"/>
7479
</references>
7580
<nowarn>
@@ -87,11 +92,13 @@
8792
<sources basedir="${path.src}">
8893
<include name="${product.name}.Test/**/*.cs"/>
8994
<include name="${product.name}.Moq.Test/**/*.cs"/>
95+
<include name="${product.name}.FakeItEasy.Test/**/*.cs" if="${string::contains(build.platform, 'silverlight-5.0')}"/>
9096
<!--<include name="${product.name}.RhinoMock.Test/**/*.cs"/>-->
9197
<include name="${product.name}.SilverlightTests/*.cs"/>
9298
<exclude name="${product.name}.Test/MSTestAttributes/*.cs"/>
9399
<exclude name="${product.name}.Moq.Test/Properties/*.cs"/>
94-
<exclude name="${product.name}.RhinoMock.Test/Properties/*.cs"/>
100+
<exclude name="${product.name}.FakeItEasy.Test/Properties/*.cs"/>
101+
<!--<exclude name="${product.name}.RhinoMock.Test/Properties/*.cs"/>-->
95102
</sources>
96103
<references basedir="${current.path.test}">
97104
<include name="mscorlib.dll"/>
@@ -108,10 +115,11 @@
108115
<include name="Castle.DynamicProxy-Silverlight.dll" unless="${build.platform == 'silverlight-4.0' or build.platform == 'silverlight-5.0'}"/>
109116
<include name="xunit.runner.silverlight.dll"/>
110117
<include name="xunit-silverlight.dll"/>
111-
<include name="Rhino.Mocks 3.5.Silverlight.dll"/>
118+
<include name="FakeItEasy.dll" if="${string::contains(build.platform, 'silverlight-5.0')}"/>
112119
<include name="FluentAssertions.Silverlight.dll"/>
113120
<include name="${product.assembly}"/>
114121
<include name="${product.assembly.moq}"/>
122+
<include name="${product.assembly.FakeItEasy}"/>
115123
<!--<include name="${product.assembly.rhinomock}"/>-->
116124
<include name="${path.lib}/Ninject/${build.platform}/Ninject.dll"/>
117125
</references>

Ninject.MockingKernel.sln

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 2013
4-
VisualStudioVersion = 12.0.30723.0
4+
VisualStudioVersion = 12.0.31101.0
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{19E2834E-3CD3-420D-ADE1-FC9A75E67E04}"
77
ProjectSection(SolutionItems) = preProject
@@ -25,6 +25,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ninject.MockingKernel.NSubs
2525
EndProject
2626
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ninject.MockingKernel.NSubstitute.Test", "src\Ninject.MockingKernel.NSubstitute.Test\Ninject.MockingKernel.NSubstitute.Test.csproj", "{DFCD85F9-31D7-4DDF-BEBE-5287B727AF37}"
2727
EndProject
28+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ninject.MockingKernel.FakeItEasy", "src\Ninject.MockingKernel.FakeItEasy\Ninject.MockingKernel.FakeItEasy.csproj", "{6C2C9465-A2FE-46B8-8537-4A81FEEFFB37}"
29+
EndProject
30+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ninject.MockingKernel.FakeItEasy.Test", "src\Ninject.MockingKernel.FakeItEasy.Test\Ninject.MockingKernel.FakeItEasy.Test.csproj", "{026CDA2C-BC44-4F2E-A6AD-EC41B74FA4FD}"
31+
EndProject
2832
Global
2933
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3034
Debug|Any CPU = Debug|Any CPU
@@ -63,6 +67,14 @@ Global
6367
{DFCD85F9-31D7-4DDF-BEBE-5287B727AF37}.Debug|Any CPU.Build.0 = Debug|Any CPU
6468
{DFCD85F9-31D7-4DDF-BEBE-5287B727AF37}.Release|Any CPU.ActiveCfg = Release|Any CPU
6569
{DFCD85F9-31D7-4DDF-BEBE-5287B727AF37}.Release|Any CPU.Build.0 = Release|Any CPU
70+
{6C2C9465-A2FE-46B8-8537-4A81FEEFFB37}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
71+
{6C2C9465-A2FE-46B8-8537-4A81FEEFFB37}.Debug|Any CPU.Build.0 = Debug|Any CPU
72+
{6C2C9465-A2FE-46B8-8537-4A81FEEFFB37}.Release|Any CPU.ActiveCfg = Release|Any CPU
73+
{6C2C9465-A2FE-46B8-8537-4A81FEEFFB37}.Release|Any CPU.Build.0 = Release|Any CPU
74+
{026CDA2C-BC44-4F2E-A6AD-EC41B74FA4FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
75+
{026CDA2C-BC44-4F2E-A6AD-EC41B74FA4FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
76+
{026CDA2C-BC44-4F2E-A6AD-EC41B74FA4FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
77+
{026CDA2C-BC44-4F2E-A6AD-EC41B74FA4FD}.Release|Any CPU.Build.0 = Release|Any CPU
6678
EndGlobalSection
6779
GlobalSection(SolutionProperties) = preSolution
6880
HideSolutionNode = FALSE

Ninject.include

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<property name="path.tools.xunit" value="${path.tools}/xunit.net" dynamic="true"/>
1616
<property name="path.tools.xunit.console" value="${path.tools.xunit}/xunit.console.exe" dynamic="true"/>
1717
<property name="path.tools.moq" value="${path.tools}/moq" dynamic="true"/>
18+
<property name="path.tools.fakeiteasy" value="${path.tools}/fakeiteasy" dynamic="true"/>
1819
<property name="path.tools.ncover" value="${path.tools}/ncover" dynamic="true"/>
1920
<property name="path.tools.git" value="${path.tools}/git" dynamic="true"/>
2021
<property name="path.tools.statlight" value="${path.tools}/statlight/statlight.exe" dynamic="true"/>
@@ -664,6 +665,7 @@
664665
<target name="CopyDefaultTestInfrastructureAssemblies-Target">
665666
<call target="CopyXUnit-Target"/>
666667
<call target="CopyMoq-Target"/>
668+
<call target="CopyFakeItEasy-Target"/>
667669
<call target="CopyFluentAssertions-Target"/>
668670
<call target="CopyProjectOutput-Target"/>
669671
</target>
@@ -676,6 +678,7 @@
676678
<target name="CopyDefaultTestInfrastructureAssemblies-SL-Target">
677679
<call target="CopyXUnit-SL-Target"/>
678680
<call target="CopyMoq-SL-Target"/>
681+
<call target="CopyFakeItEasy-SL-Target"/>
679682
<call target="CopyFluentAssertions-SL-Target"/>
680683
<call target="CopyProjectOutput-Target"/>
681684
</target>
@@ -716,6 +719,24 @@
716719
</copy>
717720
</target>
718721

722+
<target name="CopyFakeItEasy">
723+
<property name="target" value="${current.path.test}" overwrite="true" />
724+
<call target="CopyFakeItEasy-Target" />
725+
</target>
726+
727+
<target name="CopyFakeItEasy-Target">
728+
<copy todir="${target}" if="${not(string::contains(build.platform, 'net-4.')) and not(string::contains(build.platform, 'mono-4.'))}">
729+
<fileset basedir="${path.tools.fakeiteasy}/NET35">
730+
<include name="FakeItEasy.dll"/>
731+
</fileset>
732+
</copy>
733+
<copy todir="${target}" if="${string::contains(build.platform, 'net-4.') or string::contains(build.platform, 'mono-4.')}">
734+
<fileset basedir="${path.tools.fakeiteasy}/NET40">
735+
<include name="FakeItEasy.dll"/>
736+
</fileset>
737+
</copy>
738+
</target>
739+
719740
<target name="CopyXUnit">
720741
<property name="target" value="${current.path.test}" overwrite="true" />
721742
<call target="CopyXUnit-Target" />
@@ -764,6 +785,19 @@
764785
</copy>
765786
</target>
766787

788+
<target name="CopyFakeItEasy-SL">
789+
<property name="target" value="${current.path.test}" overwrite="true" />
790+
<call target="CopyFakeItEasy-SL-Target" />
791+
</target>
792+
793+
<target name="CopyFakeItEasy-SL-Target">
794+
<copy todir="${target}" if="${string::contains(build.platform, 'silverlight-5.0')}">
795+
<fileset basedir="${path.tools.fakeiteasy}/SL50">
796+
<include name="FakeItEasy.dll"/>
797+
</fileset>
798+
</copy>
799+
</target>
800+
767801
<target name="CopyXUnit-SL">
768802
<property name="target" value="${current.path.test}" overwrite="true" />
769803
<call target="CopyXUnit-SL-Target" />

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
# Ninject.MockingKernel [![NuGet Version](http://img.shields.io/nuget/v/Ninject.MockingKernel.svg?style=flat)](https://www.nuget.org/packages/Ninject.MockingKernel/) [![NuGet Downloads](http://img.shields.io/nuget/dt/Ninject.MockingKernel.svg?style=flat)](https://www.nuget.org/packages/Ninject.MockingKernel/)
22

3-
This extension provides integration between Ninject and Moq/NSubstitute/RhinoMocks, creating a "lightweight" auto-mocking container.
3+
This extension provides integration between Ninject and Moq/NSubstitute/RhinoMocks/FakeItEasy, creating a "lightweight" auto-mocking container.
44

55
## Getting started
66

77
In your tests, you should use the MockingKernel instead of the StandardKernel. It adds the following features to Ninject:
88

9-
1. The following syntax will bind a service to the mocked object of a `Mock<T>`. and add additional interfaces to the mock:
10-
`Bind<IService>().ToMock();`
9+
1. The following syntax will bind a service to the mocked object of a `Mock<T>`.
10+
```C#
11+
Bind<IService>().ToMock();
12+
```
1113
You can add additional interfaces to the mock:
12-
`Bind<IService>().ToMock(typeof(IInterface1), typeof(IInterface2));`
14+
```C#
15+
Bind<IService>().ToMock(typeof(IInterface1), typeof(IInterface2));
16+
```
1317

1418
2. If you request a service that has no binding, instead of creating an implicit self-binding, the MockingKernel
1519
will create an instance of `Mock<T>` and return the mocked object associated with it.

ReleaseNotes.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
Version 3.2..2
2+
---------------
3+
Added: Support FakeItEasy
4+
15
Version 3.2.1
26
---------------
37
Added: Support additional interfaces when mock
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0"?>
2+
<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
3+
<metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
4+
<id>Ninject.MockingKernel.RhinoMocks</id>
5+
<version></version>
6+
<authors>Ninject Project Contributors</authors>
7+
<requireLicenseAcceptance>true</requireLicenseAcceptance>
8+
<licenseUrl>https://github.com/ninject/ninject.mockingkernel/raw/master/LICENSE.txt</licenseUrl>
9+
<description>Automock implementation for RhinoMocks using Ninject to create the objects under test.</description>
10+
<releaseNotes>https://github.com/ninject/Ninject.MockingKernel/blob/master/ReleaseNotes.md</releaseNotes>
11+
<summary></summary>
12+
<language>en-US</language>
13+
<tags>Ninject ioc di automock RhinoMocks</tags>
14+
<iconUrl>https://github.com/ninject/ninject/raw/master/logos/Ninject-Logo32.png</iconUrl>
15+
<projectUrl>http://www.ninject.org</projectUrl>
16+
<dependencies>
17+
<dependency id="Ninject.MockingKernel" version="" />
18+
<dependency id="FakeItEasy" version="[1.25,2.0)" />
19+
</dependencies>
20+
</metadata>
21+
</package>
964 KB
Binary file not shown.
642 KB
Binary file not shown.

0 commit comments

Comments
 (0)