diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..f1e566e83 --- /dev/null +++ b/.travis.yml @@ -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 diff --git a/README.md b/README.md index 9af2660cb..77c28473f 100644 --- a/README.md +++ b/README.md @@ -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! diff --git a/TestHelpers.Tests/MockDirectoryTests.cs b/TestHelpers.Tests/MockDirectoryTests.cs index ee21d4cdb..66b2e7808 100644 --- a/TestHelpers.Tests/MockDirectoryTests.cs +++ b/TestHelpers.Tests/MockDirectoryTests.cs @@ -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) { diff --git a/TestHelpers.Tests/MockFileWriteAllBytesTests.cs b/TestHelpers.Tests/MockFileWriteAllBytesTests.cs index bb4d4609b..700feeec0 100644 --- a/TestHelpers.Tests/MockFileWriteAllBytesTests.cs +++ b/TestHelpers.Tests/MockFileWriteAllBytesTests.cs @@ -58,7 +58,9 @@ public void MockFile_WriteAllBytes_ShouldThrowAnUnauthorizedAccessExceptionIfFil Assert.Throws(action, "Access to the path '{0}' is denied.", path); } +#if NET40 [Test] +#endif public void MockFile_WriteAllBytes_ShouldThrowAnArgumentExceptionIfContainsIllegalCharacters() { // Arrange diff --git a/TestHelpers.Tests/TestHelpers.Tests.csproj b/TestHelpers.Tests/TestHelpers.Tests.csproj index e8c2751e3..a309eaf1a 100644 --- a/TestHelpers.Tests/TestHelpers.Tests.csproj +++ b/TestHelpers.Tests/TestHelpers.Tests.csproj @@ -1,6 +1,6 @@  - net40 + net40;netcoreapp2.0 0.0.0.1 The unit tests for our pre-built mocks @@ -39,6 +39,9 @@ +