Skip to content

Commit 08929a1

Browse files
author
Casey Burns
committed
Merge pull request #8 from kevinkuszyk/master
MVC4 version and changes for v0.1 release.
2 parents 63bbee2 + 627a8ea commit 08929a1

File tree

143 files changed

+1429
-70551
lines changed

Some content is hidden

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

143 files changed

+1429
-70551
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@ cmd.exe
1313
FluentAssertionsMvc.VisualState.xml
1414
[Rr]elease
1515
TestResult.xml
16+
17+
*.gpState
18+
[Pp]ackages/
19+
*.nupkg

.nuget/NuGet.Config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<solution>
4+
<add key="disableSourceControlIntegration" value="true" />
5+
</solution>
6+
</configuration>

.nuget/NuGet.exe

636 KB
Binary file not shown.

.nuget/NuGet.targets

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>
5+
6+
<!-- Enable the restore command to run before builds -->
7+
<RestorePackages Condition=" '$(RestorePackages)' == '' ">false</RestorePackages>
8+
9+
<!-- Property that enables building a package from a project -->
10+
<BuildPackage Condition=" '$(BuildPackage)' == '' ">false</BuildPackage>
11+
12+
<!-- Determines if package restore consent is required to restore packages -->
13+
<RequireRestoreConsent Condition=" '$(RequireRestoreConsent)' != 'false' ">true</RequireRestoreConsent>
14+
15+
<!-- Download NuGet.exe if it does not already exist -->
16+
<DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">false</DownloadNuGetExe>
17+
</PropertyGroup>
18+
19+
<ItemGroup Condition=" '$(PackageSources)' == '' ">
20+
<!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\NuGet\NuGet.Config will be used -->
21+
<!-- The official NuGet package source (https://nuget.org/api/v2/) will be excluded if package sources are specified and it does not appear in the list -->
22+
<!--
23+
<PackageSource Include="https://nuget.org/api/v2/" />
24+
<PackageSource Include="https://my-nuget-source/nuget/" />
25+
-->
26+
</ItemGroup>
27+
28+
<PropertyGroup Condition=" '$(OS)' == 'Windows_NT'">
29+
<!-- Windows specific commands -->
30+
<NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), ".nuget"))</NuGetToolsPath>
31+
<PackagesConfig>$([System.IO.Path]::Combine($(ProjectDir), "packages.config"))</PackagesConfig>
32+
<PackagesDir>$([System.IO.Path]::Combine($(SolutionDir), "packages"))</PackagesDir>
33+
</PropertyGroup>
34+
35+
<PropertyGroup Condition=" '$(OS)' != 'Windows_NT'">
36+
<!-- We need to launch nuget.exe with the mono command if we're not on windows -->
37+
<NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>
38+
<PackagesConfig>packages.config</PackagesConfig>
39+
<PackagesDir>$(SolutionDir)packages</PackagesDir>
40+
</PropertyGroup>
41+
42+
<PropertyGroup>
43+
<!-- NuGet command -->
44+
<NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\nuget.exe</NuGetExePath>
45+
<PackageSources Condition=" $(PackageSources) == '' ">@(PackageSource)</PackageSources>
46+
47+
<NuGetCommand Condition=" '$(OS)' == 'Windows_NT'">"$(NuGetExePath)"</NuGetCommand>
48+
<NuGetCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 $(NuGetExePath)</NuGetCommand>
49+
50+
<PackageOutputDir Condition="$(PackageOutputDir) == ''">$(TargetDir.Trim('\\'))</PackageOutputDir>
51+
52+
<RequireConsentSwitch Condition=" $(RequireRestoreConsent) == 'true' ">-RequireConsent</RequireConsentSwitch>
53+
<!-- Commands -->
54+
<RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(RequireConsentSwitch) -o "$(PackagesDir)"</RestoreCommand>
55+
<BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -p Configuration=$(Configuration) -o "$(PackageOutputDir)" -symbols</BuildCommand>
56+
57+
<!-- We need to ensure packages are restored prior to assembly resolve -->
58+
<BuildDependsOn Condition="$(RestorePackages) == 'true'">
59+
RestorePackages;
60+
$(BuildDependsOn);
61+
</BuildDependsOn>
62+
63+
<!-- Make the build depend on restore packages -->
64+
<BuildDependsOn Condition="$(BuildPackage) == 'true'">
65+
$(BuildDependsOn);
66+
BuildPackage;
67+
</BuildDependsOn>
68+
</PropertyGroup>
69+
70+
<Target Name="CheckPrerequisites">
71+
<!-- Raise an error if we're unable to locate nuget.exe -->
72+
<Error Condition="'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')" Text="Unable to locate '$(NuGetExePath)'" />
73+
<SetEnvironmentVariable EnvKey="VisualStudioVersion" EnvValue="$(VisualStudioVersion)" Condition=" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' " />
74+
<!--
75+
Take advantage of MsBuild's build dependency tracking to make sure that we only ever download nuget.exe once.
76+
This effectively acts as a lock that makes sure that the download operation will only happen once and all
77+
parallel builds will have to wait for it to complete.
78+
-->
79+
<MsBuild Targets="_DownloadNuGet" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT" />
80+
</Target>
81+
82+
<Target Name="_DownloadNuGet">
83+
<DownloadNuGet OutputFilename="$(NuGetExePath)" Condition=" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')" />
84+
</Target>
85+
86+
<Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
87+
<Exec Command="$(RestoreCommand)"
88+
Condition="'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')" />
89+
90+
<Exec Command="$(RestoreCommand)"
91+
LogStandardErrorAsError="true"
92+
Condition="'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')" />
93+
</Target>
94+
95+
<Target Name="BuildPackage" DependsOnTargets="CheckPrerequisites">
96+
<Exec Command="$(BuildCommand)"
97+
Condition=" '$(OS)' != 'Windows_NT' " />
98+
99+
<Exec Command="$(BuildCommand)"
100+
LogStandardErrorAsError="true"
101+
Condition=" '$(OS)' == 'Windows_NT' " />
102+
</Target>
103+
104+
<UsingTask TaskName="DownloadNuGet" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
105+
<ParameterGroup>
106+
<OutputFilename ParameterType="System.String" Required="true" />
107+
</ParameterGroup>
108+
<Task>
109+
<Reference Include="System.Core" />
110+
<Using Namespace="System" />
111+
<Using Namespace="System.IO" />
112+
<Using Namespace="System.Net" />
113+
<Using Namespace="Microsoft.Build.Framework" />
114+
<Using Namespace="Microsoft.Build.Utilities" />
115+
<Code Type="Fragment" Language="cs">
116+
<![CDATA[
117+
try {
118+
OutputFilename = Path.GetFullPath(OutputFilename);
119+
120+
Log.LogMessage("Downloading latest version of NuGet.exe...");
121+
WebClient webClient = new WebClient();
122+
webClient.DownloadFile("https://nuget.org/nuget.exe", OutputFilename);
123+
124+
return true;
125+
}
126+
catch (Exception ex) {
127+
Log.LogErrorFromException(ex);
128+
return false;
129+
}
130+
]]>
131+
</Code>
132+
</Task>
133+
</UsingTask>
134+
135+
<UsingTask TaskName="SetEnvironmentVariable" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
136+
<ParameterGroup>
137+
<EnvKey ParameterType="System.String" Required="true" />
138+
<EnvValue ParameterType="System.String" Required="true" />
139+
</ParameterGroup>
140+
<Task>
141+
<Using Namespace="System" />
142+
<Code Type="Fragment" Language="cs">
143+
<![CDATA[
144+
try {
145+
Environment.SetEnvironmentVariable(EnvKey, EnvValue, System.EnvironmentVariableTarget.Process);
146+
}
147+
catch {
148+
}
149+
]]>
150+
</Code>
151+
</Task>
152+
</UsingTask>
153+
</Project>

FluentAssertionsMvc.sln

Lines changed: 50 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

2-
Microsoft Visual Studio Solution File, Format Version 11.00
3-
# Visual Web Developer Express 2010
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 2012
44
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluentAssertions.Mvc3", "src\FluentAssertions.Mvc3\FluentAssertions.Mvc3.csproj", "{53589F79-0908-409A-8366-3E18DC637600}"
55
EndProject
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluentAssertions.Mvc3.Tests", "tests\FluentAssertions.Mvc3.Tests\FluentAssertions.Mvc3.Tests.csproj", "{3CB00FF9-3DC2-460F-82E8-EBFB6339247D}"
@@ -9,6 +9,27 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "test", "tests\test\test.csp
99
EndProject
1010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluentAssertions.Mvc3.Samples", "samples\FluentAssertions.Mvc3.Samples\FluentAssertions.Mvc3.Samples.csproj", "{95B0CEBD-D9B8-4C41-A918-B13317A9AC16}"
1111
EndProject
12+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluentAssertions.Mvc4", "src\FluentAssertions.Mvc4\FluentAssertions.Mvc4.csproj", "{B18BFBDE-02A0-4DB2-AFEA-E756C177E4AD}"
13+
EndProject
14+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluentAssertions.Mvc4.Tests", "tests\FluentAssertions.Mvc4.Tests\FluentAssertions.Mvc4.Tests.csproj", "{B9F72C07-90A8-4A15-815B-7618530CA889}"
15+
EndProject
16+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Mvc3", "Mvc3", "{4E91D524-3DC0-4E08-82FE-6FDAEB89212B}"
17+
EndProject
18+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Mvc4", "Mvc4", "{34E084BA-3DFA-4042-9B30-5C14831901B4}"
19+
EndProject
20+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{D241AE45-1989-4B1F-8836-0DEDC1601320}"
21+
ProjectSection(SolutionItems) = preProject
22+
.nuget\NuGet.Config = .nuget\NuGet.Config
23+
.nuget\NuGet.exe = .nuget\NuGet.exe
24+
.nuget\NuGet.targets = .nuget\NuGet.targets
25+
EndProjectSection
26+
EndProject
27+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "nuspecs", "nuspecs", "{48A7D304-F178-46B0-901E-E060D87B5E07}"
28+
ProjectSection(SolutionItems) = preProject
29+
src\FluentAssertions.Mvc3\FluentAssertions.Mvc3.nuspec = src\FluentAssertions.Mvc3\FluentAssertions.Mvc3.nuspec
30+
src\FluentAssertions.Mvc4\FluentAssertions.Mvc4.nuspec = src\FluentAssertions.Mvc4\FluentAssertions.Mvc4.nuspec
31+
EndProjectSection
32+
EndProject
1233
Global
1334
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1435
Debug|Any CPU = Debug|Any CPU
@@ -56,8 +77,35 @@ Global
5677
{95B0CEBD-D9B8-4C41-A918-B13317A9AC16}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
5778
{95B0CEBD-D9B8-4C41-A918-B13317A9AC16}.Release|Mixed Platforms.Build.0 = Release|Any CPU
5879
{95B0CEBD-D9B8-4C41-A918-B13317A9AC16}.Release|x86.ActiveCfg = Release|Any CPU
80+
{B18BFBDE-02A0-4DB2-AFEA-E756C177E4AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
81+
{B18BFBDE-02A0-4DB2-AFEA-E756C177E4AD}.Debug|Any CPU.Build.0 = Debug|Any CPU
82+
{B18BFBDE-02A0-4DB2-AFEA-E756C177E4AD}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
83+
{B18BFBDE-02A0-4DB2-AFEA-E756C177E4AD}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
84+
{B18BFBDE-02A0-4DB2-AFEA-E756C177E4AD}.Debug|x86.ActiveCfg = Debug|Any CPU
85+
{B18BFBDE-02A0-4DB2-AFEA-E756C177E4AD}.Release|Any CPU.ActiveCfg = Release|Any CPU
86+
{B18BFBDE-02A0-4DB2-AFEA-E756C177E4AD}.Release|Any CPU.Build.0 = Release|Any CPU
87+
{B18BFBDE-02A0-4DB2-AFEA-E756C177E4AD}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
88+
{B18BFBDE-02A0-4DB2-AFEA-E756C177E4AD}.Release|Mixed Platforms.Build.0 = Release|Any CPU
89+
{B18BFBDE-02A0-4DB2-AFEA-E756C177E4AD}.Release|x86.ActiveCfg = Release|Any CPU
90+
{B9F72C07-90A8-4A15-815B-7618530CA889}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
91+
{B9F72C07-90A8-4A15-815B-7618530CA889}.Debug|Any CPU.Build.0 = Debug|Any CPU
92+
{B9F72C07-90A8-4A15-815B-7618530CA889}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
93+
{B9F72C07-90A8-4A15-815B-7618530CA889}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
94+
{B9F72C07-90A8-4A15-815B-7618530CA889}.Debug|x86.ActiveCfg = Debug|Any CPU
95+
{B9F72C07-90A8-4A15-815B-7618530CA889}.Release|Any CPU.ActiveCfg = Release|Any CPU
96+
{B9F72C07-90A8-4A15-815B-7618530CA889}.Release|Any CPU.Build.0 = Release|Any CPU
97+
{B9F72C07-90A8-4A15-815B-7618530CA889}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
98+
{B9F72C07-90A8-4A15-815B-7618530CA889}.Release|Mixed Platforms.Build.0 = Release|Any CPU
99+
{B9F72C07-90A8-4A15-815B-7618530CA889}.Release|x86.ActiveCfg = Release|Any CPU
59100
EndGlobalSection
60101
GlobalSection(SolutionProperties) = preSolution
61102
HideSolutionNode = FALSE
62103
EndGlobalSection
104+
GlobalSection(NestedProjects) = preSolution
105+
{3CB00FF9-3DC2-460F-82E8-EBFB6339247D} = {4E91D524-3DC0-4E08-82FE-6FDAEB89212B}
106+
{95B0CEBD-D9B8-4C41-A918-B13317A9AC16} = {4E91D524-3DC0-4E08-82FE-6FDAEB89212B}
107+
{53589F79-0908-409A-8366-3E18DC637600} = {4E91D524-3DC0-4E08-82FE-6FDAEB89212B}
108+
{B9F72C07-90A8-4A15-815B-7618530CA889} = {34E084BA-3DFA-4042-9B30-5C14831901B4}
109+
{B18BFBDE-02A0-4DB2-AFEA-E756C177E4AD} = {34E084BA-3DFA-4042-9B30-5C14831901B4}
110+
EndGlobalSection
63111
EndGlobal

Package.cmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ echo.
88
echo *** BUILD SUCCESSFUL ***
99
echo.
1010

11-
cd release
12-
nuget pack
11+
.nuget\nuget pack src\FluentAssertions.Mvc3\FluentAssertions.Mvc3.csproj
12+
.nuget\nuget pack src\FluentAssertions.Mvc4\FluentAssertions.Mvc4.csproj
1313
if errorlevel 1 goto PackageFail
1414

1515
echo.

_todo_.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[ ] Check for ActionResult types that derive from basic types
2-
[ ] Change lib folder to use restorable nuget packages
2+
[x] Change lib folder to use restorable nuget packages
33
[ ] All ShouldThrow tests must assert the exception message
44
[ ] Fix all fail messages to be like RedirectToRouteAssertions
55
[ ] Change all dictionary asserts to us Subject.RouteValues.Should().Contain
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)