Skip to content

MVC4 version and changes for v0.1 release. #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Feb 13, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
d7749fe
FluentAssertions updated to version 2.0.0.1 and changed over to use n…
kevinkuszyk Dec 19, 2012
8a4b233
WithDefaultViewName assertion added.
kevinkuszyk Dec 19, 2012
2ed8da0
Added check for null model in ViewResultBaseAssertions.
kevinkuszyk Dec 19, 2012
ae70fe9
Solution and samples project updated to allow round-tripping with VS …
kevinkuszyk Dec 21, 2012
f25fc82
New FailureMessageHelper class added to assist verifying test failure…
kevinkuszyk Dec 21, 2012
d91431c
Added route data assertion failure messages to resource file, and fix…
kevinkuszyk Jan 4, 2013
915b7c5
Moved content assertions common failure message to resource file, and…
kevinkuszyk Jan 4, 2013
16133ac
View result assertion failure messages moved to resource file, and fi…
kevinkuszyk Jan 4, 2013
9e3a56e
Renamed WithDefaultView assertion.
kevinkuszyk Jan 8, 2013
540ece7
Namespace changed to FluentAssertions.Mvc
kevinkuszyk Jan 8, 2013
b5c6d68
Added Mvc4 projects.
kevinkuszyk Jan 8, 2013
1a40dce
Version number set to 1.0.0-beta1
kevinkuszyk Jan 8, 2013
a0a2927
PartialViewResultAssertions base class changed to ViewResultBaseAsser…
kevinkuszyk Jan 25, 2013
249642f
Added test class for PartialViewResultAssertions.
kevinkuszyk Jan 25, 2013
baa0a78
Reference to FluentAssertionsMvc.settings.targets file added to Mvc4 …
kevinkuszyk Jan 30, 2013
6079a89
OutputPath property removed as it is set in the FluentAssertionsMvc.s…
kevinkuszyk Jan 30, 2013
73907f3
Merge branch 'Mvc4'
kevinkuszyk Feb 8, 2013
d4270af
Corrected namespace in PartialViewResultAssertions tests class.
kevinkuszyk Feb 8, 2013
5e6029b
Result suffix added to ActionResult assertions. Closes CaseyBurns/Fl…
kevinkuszyk Feb 8, 2013
bc8b72c
Nuget package restore enabled, packages folder removed from git.
kevinkuszyk Feb 8, 2013
f388a86
Added license.txt
kevinkuszyk Feb 8, 2013
f2360dd
nuspec files added, and package script updated to pack both projects.…
kevinkuszyk Feb 8, 2013
67d0559
Version set to 0.1.0.
kevinkuszyk Feb 8, 2013
627a8ea
.gitignore updated.
kevinkuszyk Feb 8, 2013
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ cmd.exe
FluentAssertionsMvc.VisualState.xml
[Rr]elease
TestResult.xml

*.gpState
[Pp]ackages/
*.nupkg
6 changes: 6 additions & 0 deletions .nuget/NuGet.Config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<solution>
<add key="disableSourceControlIntegration" value="true" />
</solution>
</configuration>
Binary file added .nuget/NuGet.exe
Binary file not shown.
153 changes: 153 additions & 0 deletions .nuget/NuGet.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>

<!-- Enable the restore command to run before builds -->
<RestorePackages Condition=" '$(RestorePackages)' == '' ">false</RestorePackages>

<!-- Property that enables building a package from a project -->
<BuildPackage Condition=" '$(BuildPackage)' == '' ">false</BuildPackage>

<!-- Determines if package restore consent is required to restore packages -->
<RequireRestoreConsent Condition=" '$(RequireRestoreConsent)' != 'false' ">true</RequireRestoreConsent>

<!-- Download NuGet.exe if it does not already exist -->
<DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">false</DownloadNuGetExe>
</PropertyGroup>

<ItemGroup Condition=" '$(PackageSources)' == '' ">
<!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\NuGet\NuGet.Config will be used -->
<!-- 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 -->
<!--
<PackageSource Include="https://nuget.org/api/v2/" />
<PackageSource Include="https://my-nuget-source/nuget/" />
-->
</ItemGroup>

<PropertyGroup Condition=" '$(OS)' == 'Windows_NT'">
<!-- Windows specific commands -->
<NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), ".nuget"))</NuGetToolsPath>
<PackagesConfig>$([System.IO.Path]::Combine($(ProjectDir), "packages.config"))</PackagesConfig>
<PackagesDir>$([System.IO.Path]::Combine($(SolutionDir), "packages"))</PackagesDir>
</PropertyGroup>

<PropertyGroup Condition=" '$(OS)' != 'Windows_NT'">
<!-- We need to launch nuget.exe with the mono command if we're not on windows -->
<NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>
<PackagesConfig>packages.config</PackagesConfig>
<PackagesDir>$(SolutionDir)packages</PackagesDir>
</PropertyGroup>

<PropertyGroup>
<!-- NuGet command -->
<NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\nuget.exe</NuGetExePath>
<PackageSources Condition=" $(PackageSources) == '' ">@(PackageSource)</PackageSources>

<NuGetCommand Condition=" '$(OS)' == 'Windows_NT'">"$(NuGetExePath)"</NuGetCommand>
<NuGetCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 $(NuGetExePath)</NuGetCommand>

<PackageOutputDir Condition="$(PackageOutputDir) == ''">$(TargetDir.Trim('\\'))</PackageOutputDir>

<RequireConsentSwitch Condition=" $(RequireRestoreConsent) == 'true' ">-RequireConsent</RequireConsentSwitch>
<!-- Commands -->
<RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(RequireConsentSwitch) -o "$(PackagesDir)"</RestoreCommand>
<BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -p Configuration=$(Configuration) -o "$(PackageOutputDir)" -symbols</BuildCommand>

<!-- We need to ensure packages are restored prior to assembly resolve -->
<BuildDependsOn Condition="$(RestorePackages) == 'true'">
RestorePackages;
$(BuildDependsOn);
</BuildDependsOn>

<!-- Make the build depend on restore packages -->
<BuildDependsOn Condition="$(BuildPackage) == 'true'">
$(BuildDependsOn);
BuildPackage;
</BuildDependsOn>
</PropertyGroup>

<Target Name="CheckPrerequisites">
<!-- Raise an error if we're unable to locate nuget.exe -->
<Error Condition="'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')" Text="Unable to locate '$(NuGetExePath)'" />
<SetEnvironmentVariable EnvKey="VisualStudioVersion" EnvValue="$(VisualStudioVersion)" Condition=" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' " />
<!--
Take advantage of MsBuild's build dependency tracking to make sure that we only ever download nuget.exe once.
This effectively acts as a lock that makes sure that the download operation will only happen once and all
parallel builds will have to wait for it to complete.
-->
<MsBuild Targets="_DownloadNuGet" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT" />
</Target>

<Target Name="_DownloadNuGet">
<DownloadNuGet OutputFilename="$(NuGetExePath)" Condition=" '$(DownloadNuGetExe)' == 'true' AND !Exists('$(NuGetExePath)')" />
</Target>

<Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
<Exec Command="$(RestoreCommand)"
Condition="'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')" />

<Exec Command="$(RestoreCommand)"
LogStandardErrorAsError="true"
Condition="'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')" />
</Target>

<Target Name="BuildPackage" DependsOnTargets="CheckPrerequisites">
<Exec Command="$(BuildCommand)"
Condition=" '$(OS)' != 'Windows_NT' " />

<Exec Command="$(BuildCommand)"
LogStandardErrorAsError="true"
Condition=" '$(OS)' == 'Windows_NT' " />
</Target>

<UsingTask TaskName="DownloadNuGet" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<OutputFilename ParameterType="System.String" Required="true" />
</ParameterGroup>
<Task>
<Reference Include="System.Core" />
<Using Namespace="System" />
<Using Namespace="System.IO" />
<Using Namespace="System.Net" />
<Using Namespace="Microsoft.Build.Framework" />
<Using Namespace="Microsoft.Build.Utilities" />
<Code Type="Fragment" Language="cs">
<![CDATA[
try {
OutputFilename = Path.GetFullPath(OutputFilename);

Log.LogMessage("Downloading latest version of NuGet.exe...");
WebClient webClient = new WebClient();
webClient.DownloadFile("https://nuget.org/nuget.exe", OutputFilename);

return true;
}
catch (Exception ex) {
Log.LogErrorFromException(ex);
return false;
}
]]>
</Code>
</Task>
</UsingTask>

<UsingTask TaskName="SetEnvironmentVariable" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<EnvKey ParameterType="System.String" Required="true" />
<EnvValue ParameterType="System.String" Required="true" />
</ParameterGroup>
<Task>
<Using Namespace="System" />
<Code Type="Fragment" Language="cs">
<![CDATA[
try {
Environment.SetEnvironmentVariable(EnvKey, EnvValue, System.EnvironmentVariableTarget.Process);
}
catch {
}
]]>
</Code>
</Task>
</UsingTask>
</Project>
52 changes: 50 additions & 2 deletions FluentAssertionsMvc.sln
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Web Developer Express 2010
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluentAssertions.Mvc3", "src\FluentAssertions.Mvc3\FluentAssertions.Mvc3.csproj", "{53589F79-0908-409A-8366-3E18DC637600}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluentAssertions.Mvc3.Tests", "tests\FluentAssertions.Mvc3.Tests\FluentAssertions.Mvc3.Tests.csproj", "{3CB00FF9-3DC2-460F-82E8-EBFB6339247D}"
Expand All @@ -9,6 +9,27 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "test", "tests\test\test.csp
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluentAssertions.Mvc3.Samples", "samples\FluentAssertions.Mvc3.Samples\FluentAssertions.Mvc3.Samples.csproj", "{95B0CEBD-D9B8-4C41-A918-B13317A9AC16}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluentAssertions.Mvc4", "src\FluentAssertions.Mvc4\FluentAssertions.Mvc4.csproj", "{B18BFBDE-02A0-4DB2-AFEA-E756C177E4AD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FluentAssertions.Mvc4.Tests", "tests\FluentAssertions.Mvc4.Tests\FluentAssertions.Mvc4.Tests.csproj", "{B9F72C07-90A8-4A15-815B-7618530CA889}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Mvc3", "Mvc3", "{4E91D524-3DC0-4E08-82FE-6FDAEB89212B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Mvc4", "Mvc4", "{34E084BA-3DFA-4042-9B30-5C14831901B4}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{D241AE45-1989-4B1F-8836-0DEDC1601320}"
ProjectSection(SolutionItems) = preProject
.nuget\NuGet.Config = .nuget\NuGet.Config
.nuget\NuGet.exe = .nuget\NuGet.exe
.nuget\NuGet.targets = .nuget\NuGet.targets
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "nuspecs", "nuspecs", "{48A7D304-F178-46B0-901E-E060D87B5E07}"
ProjectSection(SolutionItems) = preProject
src\FluentAssertions.Mvc3\FluentAssertions.Mvc3.nuspec = src\FluentAssertions.Mvc3\FluentAssertions.Mvc3.nuspec
src\FluentAssertions.Mvc4\FluentAssertions.Mvc4.nuspec = src\FluentAssertions.Mvc4\FluentAssertions.Mvc4.nuspec
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -56,8 +77,35 @@ Global
{95B0CEBD-D9B8-4C41-A918-B13317A9AC16}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{95B0CEBD-D9B8-4C41-A918-B13317A9AC16}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{95B0CEBD-D9B8-4C41-A918-B13317A9AC16}.Release|x86.ActiveCfg = Release|Any CPU
{B18BFBDE-02A0-4DB2-AFEA-E756C177E4AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B18BFBDE-02A0-4DB2-AFEA-E756C177E4AD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B18BFBDE-02A0-4DB2-AFEA-E756C177E4AD}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{B18BFBDE-02A0-4DB2-AFEA-E756C177E4AD}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{B18BFBDE-02A0-4DB2-AFEA-E756C177E4AD}.Debug|x86.ActiveCfg = Debug|Any CPU
{B18BFBDE-02A0-4DB2-AFEA-E756C177E4AD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B18BFBDE-02A0-4DB2-AFEA-E756C177E4AD}.Release|Any CPU.Build.0 = Release|Any CPU
{B18BFBDE-02A0-4DB2-AFEA-E756C177E4AD}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{B18BFBDE-02A0-4DB2-AFEA-E756C177E4AD}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{B18BFBDE-02A0-4DB2-AFEA-E756C177E4AD}.Release|x86.ActiveCfg = Release|Any CPU
{B9F72C07-90A8-4A15-815B-7618530CA889}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B9F72C07-90A8-4A15-815B-7618530CA889}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B9F72C07-90A8-4A15-815B-7618530CA889}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{B9F72C07-90A8-4A15-815B-7618530CA889}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{B9F72C07-90A8-4A15-815B-7618530CA889}.Debug|x86.ActiveCfg = Debug|Any CPU
{B9F72C07-90A8-4A15-815B-7618530CA889}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B9F72C07-90A8-4A15-815B-7618530CA889}.Release|Any CPU.Build.0 = Release|Any CPU
{B9F72C07-90A8-4A15-815B-7618530CA889}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{B9F72C07-90A8-4A15-815B-7618530CA889}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{B9F72C07-90A8-4A15-815B-7618530CA889}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{3CB00FF9-3DC2-460F-82E8-EBFB6339247D} = {4E91D524-3DC0-4E08-82FE-6FDAEB89212B}
{95B0CEBD-D9B8-4C41-A918-B13317A9AC16} = {4E91D524-3DC0-4E08-82FE-6FDAEB89212B}
{53589F79-0908-409A-8366-3E18DC637600} = {4E91D524-3DC0-4E08-82FE-6FDAEB89212B}
{B9F72C07-90A8-4A15-815B-7618530CA889} = {34E084BA-3DFA-4042-9B30-5C14831901B4}
{B18BFBDE-02A0-4DB2-AFEA-E756C177E4AD} = {34E084BA-3DFA-4042-9B30-5C14831901B4}
EndGlobalSection
EndGlobal
4 changes: 2 additions & 2 deletions Package.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ echo.
echo *** BUILD SUCCESSFUL ***
echo.

cd release
nuget pack
.nuget\nuget pack src\FluentAssertions.Mvc3\FluentAssertions.Mvc3.csproj
.nuget\nuget pack src\FluentAssertions.Mvc4\FluentAssertions.Mvc4.csproj
if errorlevel 1 goto PackageFail

echo.
Expand Down
2 changes: 1 addition & 1 deletion _todo_.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[ ] Check for ActionResult types that derive from basic types
[ ] Change lib folder to use restorable nuget packages
[x] Change lib folder to use restorable nuget packages
[ ] All ShouldThrow tests must assert the exception message
[ ] Fix all fail messages to be like RedirectToRouteAssertions
[ ] Change all dictionary asserts to us Subject.RouteValues.Should().Contain
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading