Skip to content

Commit

Permalink
Merge pull request #291 from System-IO-Abstractions/fgreinacher-add-t…
Browse files Browse the repository at this point in the history
…ravisci

Add Travis CI for Unix-based CI
  • Loading branch information
tathamoddie authored Jul 4, 2018
2 parents 4a1d5a3 + 76e0c6a commit ec9afda
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
language: csharp
mono: none
dotnet: 2.1.4
script:
- dotnet build System.IO.Abstractions --framework netstandard1.4
- dotnet build TestingHelpers --framework netstandard1.4
- dotnet test TestHelpers.Tests --framework netcoreapp2.0
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[![Build status](https://ci.appveyor.com/api/projects/status/em172apw1v5k70vq/branch/master?svg=true)](https://ci.appveyor.com/project/tathamoddie/system-io-abstractions/branch/master)
[![Windows build status](https://ci.appveyor.com/api/projects/status/em172apw1v5k70vq/branch/master?svg=true)](https://ci.appveyor.com/project/tathamoddie/system-io-abstractions/branch/master)
[![Linus build status](https://travis-ci.org/System-IO-Abstractions/System.IO.Abstractions.svg?branch=master)](https://travis-ci.org/System-IO-Abstractions/System.IO.Abstractions)
[![NuGet](https://img.shields.io/nuget/v/System.IO.Abstractions.svg)](https://www.nuget.org/packages/System.IO.Abstractions)

Just like System.Web.Abstractions, but for System.IO. Yay for testable IO access!
Expand Down
2 changes: 2 additions & 0 deletions TestHelpers.Tests/MockDirectoryTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,9 @@ public void MockDirectory_GetFiles_ShouldFindFilesContainingTwoOrMoreDots()
Assert.That(actualResult, Is.EquivalentTo(new [] { testPath }));
}

#if NET40
[TestCase(@"""")]
#endif
[TestCase("aa\t")]
public void MockDirectory_GetFiles_ShouldThrowAnArgumentException_IfSearchPatternHasIllegalCharacters(string searchPattern)
{
Expand Down
2 changes: 2 additions & 0 deletions TestHelpers.Tests/MockFileWriteAllBytesTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ public void MockFile_WriteAllBytes_ShouldThrowAnUnauthorizedAccessExceptionIfFil
Assert.Throws<UnauthorizedAccessException>(action, "Access to the path '{0}' is denied.", path);
}

#if NET40
[Test]
#endif
public void MockFile_WriteAllBytes_ShouldThrowAnArgumentExceptionIfContainsIllegalCharacters()
{
// Arrange
Expand Down
5 changes: 4 additions & 1 deletion TestHelpers.Tests/TestHelpers.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net40</TargetFrameworks>
<TargetFrameworks>net40;netcoreapp2.0</TargetFrameworks>
<Version>0.0.0.1</Version>
<Description>The unit tests for our pre-built mocks</Description>
<Company />
Expand Down Expand Up @@ -39,6 +39,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk"
Version="15.0.0"
Condition="'$(TargetFramework)' != 'net40'" />
<PackageReference Include="nunit" Version="3.8.1" />
<PackageReference Include="NUnit3TestAdapter" Version="3.9.0" />
</ItemGroup>
Expand Down

0 comments on commit ec9afda

Please sign in to comment.