Skip to content

Commit ec9afda

Browse files
authored
Merge pull request #291 from System-IO-Abstractions/fgreinacher-add-travisci
Add Travis CI for Unix-based CI
2 parents 4a1d5a3 + 76e0c6a commit ec9afda

5 files changed

Lines changed: 17 additions & 2 deletions

File tree

.travis.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
language: csharp
2+
mono: none
3+
dotnet: 2.1.4
4+
script:
5+
- dotnet build System.IO.Abstractions --framework netstandard1.4
6+
- dotnet build TestingHelpers --framework netstandard1.4
7+
- dotnet test TestHelpers.Tests --framework netcoreapp2.0

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
[![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)
1+
[![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)
2+
[![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)
23
[![NuGet](https://img.shields.io/nuget/v/System.IO.Abstractions.svg)](https://www.nuget.org/packages/System.IO.Abstractions)
34

45
Just like System.Web.Abstractions, but for System.IO. Yay for testable IO access!

TestHelpers.Tests/MockDirectoryTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,9 @@ public void MockDirectory_GetFiles_ShouldFindFilesContainingTwoOrMoreDots()
784784
Assert.That(actualResult, Is.EquivalentTo(new [] { testPath }));
785785
}
786786

787+
#if NET40
787788
[TestCase(@"""")]
789+
#endif
788790
[TestCase("aa\t")]
789791
public void MockDirectory_GetFiles_ShouldThrowAnArgumentException_IfSearchPatternHasIllegalCharacters(string searchPattern)
790792
{

TestHelpers.Tests/MockFileWriteAllBytesTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ public void MockFile_WriteAllBytes_ShouldThrowAnUnauthorizedAccessExceptionIfFil
5858
Assert.Throws<UnauthorizedAccessException>(action, "Access to the path '{0}' is denied.", path);
5959
}
6060

61+
#if NET40
6162
[Test]
63+
#endif
6264
public void MockFile_WriteAllBytes_ShouldThrowAnArgumentExceptionIfContainsIllegalCharacters()
6365
{
6466
// Arrange

TestHelpers.Tests/TestHelpers.Tests.csproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net40</TargetFrameworks>
3+
<TargetFrameworks>net40;netcoreapp2.0</TargetFrameworks>
44
<Version>0.0.0.1</Version>
55
<Description>The unit tests for our pre-built mocks</Description>
66
<Company />
@@ -39,6 +39,9 @@
3939
</ItemGroup>
4040

4141
<ItemGroup>
42+
<PackageReference Include="Microsoft.NET.Test.Sdk"
43+
Version="15.0.0"
44+
Condition="'$(TargetFramework)' != 'net40'" />
4245
<PackageReference Include="nunit" Version="3.8.1" />
4346
<PackageReference Include="NUnit3TestAdapter" Version="3.9.0" />
4447
</ItemGroup>

0 commit comments

Comments
 (0)