Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
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
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
3 changes: 2 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
image: Visual Studio 2017

configuration: Release

skip_branch_with_pr: true
Expand All @@ -18,7 +19,7 @@ dotnet_csproj:
package_version: '{version}'

before_build:
- nuget restore
- cmd: nuget restore

build:
publish_nuget: true
Expand Down