Skip to content

Commit

Permalink
Upgrade xunit, Fody, and Fody.NullGuard
Browse files Browse the repository at this point in the history
  • Loading branch information
haacked committed Mar 11, 2015
1 parent 53a0383 commit 233fc8c
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 112 deletions.
16 changes: 7 additions & 9 deletions Tests/NullGuardTest.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#if !DEBUG
using System;
#endif
using Rothko;
#endif
using Xunit;
using Xunit.Sdk;
using Environment = Rothko.Environment;

namespace Tests
{
Expand All @@ -12,21 +12,19 @@ public class NullGuardTest
[Fact]
public void MakeSureNullGuardIsWorking()
{
#if DEBUG
Assert.Throws<TraceAssertException>(() => new FileInfo(null));
#else
#if !DEBUG
Assert.Throws<ArgumentNullException>(() => new FileInfo(null));
#endif
}

[Fact]
public void CheckOSVersionImplementation()
{
Environment env = new Environment();
var environment = new Environment();

Assert.NotNull(env.OSVersion.Edition);
Assert.NotNull(env.OSVersion.Name);
Assert.True(env.OSVersion.ToString().Length > 7);
Assert.NotNull(environment.OSVersion.Edition);
Assert.NotNull(environment.OSVersion.Name);
Assert.True(environment.OSVersion.ToString().Length > 7);
}
}
}
19 changes: 16 additions & 3 deletions Tests/Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\xunit.core.2.0.0-rc4-build2924\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.props" Condition="Exists('..\packages\xunit.core.2.0.0-rc4-build2924\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Expand All @@ -13,6 +14,7 @@
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>a85f3fa6</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down Expand Up @@ -41,9 +43,14 @@
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="xunit, Version=1.9.2.1705, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\xunit.1.9.2\lib\net20\xunit.dll</HintPath>
<Reference Include="xunit.abstractions">
<HintPath>..\packages\xunit.abstractions.2.0.0-rc4-build2924\lib\net35\xunit.abstractions.dll</HintPath>
</Reference>
<Reference Include="xunit.assert">
<HintPath>..\packages\xunit.assert.2.0.0-rc4-build2924\lib\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.assert.dll</HintPath>
</Reference>
<Reference Include="xunit.core">
<HintPath>..\packages\xunit.extensibility.core.2.0.0-rc4-build2924\lib\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand All @@ -60,6 +67,12 @@
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\xunit.core.2.0.0-rc4-build2924\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\xunit.core.2.0.0-rc4-build2924\build\portable-net45+win+wpa81+wp80+monotouch+monoandroid+Xamarin.iOS\xunit.core.props'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
6 changes: 5 additions & 1 deletion Tests/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="xunit" version="1.9.2" targetFramework="net45" />
<package id="xunit" version="2.0.0-rc4-build2924" targetFramework="net45" />
<package id="xunit.abstractions" version="2.0.0-rc4-build2924" targetFramework="net45" />
<package id="xunit.assert" version="2.0.0-rc4-build2924" targetFramework="net45" />
<package id="xunit.core" version="2.0.0-rc4-build2924" targetFramework="net45" />
<package id="xunit.extensibility.core" version="2.0.0-rc4-build2924" targetFramework="net45" />
</packages>
89 changes: 0 additions & 89 deletions src/Fody.targets

This file was deleted.

2 changes: 1 addition & 1 deletion src/FodyWeavers.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Weavers>
<NullGuard />
<NullGuard/>
</Weavers>
16 changes: 9 additions & 7 deletions src/Rothko.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
<AssemblyName>Rothko</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FodyPath>..\packages\Fody.1.19.1.0</FodyPath>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>10c9b3d4</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down Expand Up @@ -44,10 +44,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="NullGuard">
<HintPath>..\packages\NullGuard.Fody.1.0.0.0\Lib\portable-net4+sl4+wp7+win8+MonoAndroid16+MonoTouch40\NullGuard.dll</HintPath>
<HintPath>..\..\packages\NullGuard.Fody.1.1.0.0\Lib\portable-net4+sl4+wp7+win8+MonoAndroid16+MonoTouch40\NullGuard.dll</HintPath>
<HintPath>..\packages\NullGuard.Fody.1.1.0.0\Lib\portable-net4+sl4+wp7+win8+MonoAndroid16+MonoTouch40\NullGuard.dll</HintPath>
<Private>False</Private>
<HintPath>..\packages\NullGuard.Fody.1.4.1\Lib\portable-net4+sl4+wp7+win8+MonoAndroid16+MonoTouch40\NullGuard.dll</HintPath>
</Reference>
<Reference Include="PresentationFramework" />
<Reference Include="System" />
Expand Down Expand Up @@ -130,11 +127,16 @@
<Content Include="FodyWeavers.xml" />
</ItemGroup>
<ItemGroup>
<None Include="Fody.targets" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="Fody.targets" />
<Import Project="..\packages\Fody.1.28.0\build\Fody.targets" Condition="Exists('..\packages\Fody.1.28.0\build\Fody.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Fody.1.28.0\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.1.28.0\build\Fody.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
4 changes: 2 additions & 2 deletions src/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Fody" version="1.19.1.0" targetFramework="net45" developmentDependency="true" />
<package id="NullGuard.Fody" version="1.1.0.0" targetFramework="net45" developmentDependency="true" />
<package id="Fody" version="1.28.0" targetFramework="net45" developmentDependency="true" />
<package id="NullGuard.Fody" version="1.4.1" targetFramework="net45" developmentDependency="true" />
</packages>

0 comments on commit 233fc8c

Please sign in to comment.