Skip to content

Commit 1f2a2b9

Browse files
authored
Testing (#6)
* Update appveyor.yml * Moved testing projects to test folder * Update PCLExt.FileStorage.nuspec * Fixed reference * Replaced old MAC constant with __MACOS__ * Another reference fix * Update appveyor.yml For some reason dotnet build is adding /Any CPU/ folder * Update appveyor.yml Removed spaces at the start * Update appveyor.yml Any CPU contains spaces, needs quotes * dotnet test workaround * Update PCLExt.FileStorage.Core.Test.csproj * Update README.md [skip ci] * Update .travis.yml * Update .travis.yml * Update .travis.yml * Downgraded NetFX.Test project to .net 4.5 * Update .travis.yml * Update .travis.yml * Update .travis.yml * Update .travis.yml * Update .travis.yml * Update .travis.yml * Updated nuget packages * Removed mstest, using nunit only * Update .travis.yml * Removed traces of mstest * Returned Microsoft.NET.Test.Sdk and added NUnit3TestAdapter
1 parent 1dc1565 commit 1f2a2b9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+279
-383
lines changed

.travis.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
os: linux
2+
dist: trusty
3+
sudo: required
14
language: csharp
2-
mono:
3-
- latest
5+
mono: latest
6+
dotnet: 2.0.0
7+
env: MONO_BASE_PATH=/usr/lib/mono/
48

59
solution: PCLExt.FileStorage.sln
610

@@ -11,8 +15,19 @@ install:
1115
- nuget restore PCLExt.FileStorage.sln
1216

1317
script:
14-
- xbuild /p:Configuration=Release PCLExt.FileStorage.sln
15-
- xbuild /p:Configuration=Debug PCLExt.FileStorage.sln
18+
- dotnet restore src/PCLExt.FileStorage.Standard.Abstractions
19+
- dotnet restore src/PCLExt.FileStorage.Core
20+
- dotnet restore src/PCLExt.FileStorage.NetFX
21+
- dotnet restore test/PCLExt.FileStorage.Core.Test
22+
- dotnet restore test/PCLExt.FileStorage.NetFX.Test
23+
- dotnet build src/PCLExt.FileStorage.Standard.Abstractions
24+
- dotnet build src/PCLExt.FileStorage.Core
25+
- FrameworkPathOverride=$MONO_BASE_PATH/4.5-api/ dotnet build src/PCLExt.FileStorage.NetFX
26+
- dotnet build test/PCLExt.FileStorage.Core.Test
27+
- FrameworkPathOverride=$MONO_BASE_PATH/4.5-api/ dotnet build test/PCLExt.FileStorage.NetFX.Test
28+
- dotnet test test/PCLExt.FileStorage.Core.Test/PCLExt.FileStorage.Core.Test.csproj
29+
- nuget install NUnit.ConsoleRunner -Version 3.7.0 -OutputDirectory $PWD/packages
30+
- mono packages/NUnit.ConsoleRunner.3.7.0/tools/nunit3-console.exe test/PCLExt.FileStorage.NetFX.Test/bin/Debug/PCLExt.FileStorage.NetFX.Test.dll
1631

1732
notifications:
1833
email:

PCLExt.FileStorage.sln

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,25 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PCLExt.FileStorage.iOS", "s
99
EndProject
1010
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PCLExt.FileStorage.Core", "src\PCLExt.FileStorage.Core\PCLExt.FileStorage.Core.csproj", "{94E4FE17-7F2B-4623-8FFA-12F4056CCB2A}"
1111
EndProject
12-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PCLExt.FileStorage.Android.Test", "src\PCLExt.FileStorage.Android.Test\PCLExt.FileStorage.Android.Test.csproj", "{CB89F319-1C9D-4574-8874-25F592EC76CD}"
12+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PCLExt.FileStorage.Android.Test", "test\PCLExt.FileStorage.Android.Test\PCLExt.FileStorage.Android.Test.csproj", "{CB89F319-1C9D-4574-8874-25F592EC76CD}"
1313
EndProject
14-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PCLExt.FileStorage.iOS.Test", "src\PCLExt.FileStorage.iOS.Test\PCLExt.FileStorage.iOS.Test.csproj", "{12AB9E53-8A6F-4B3A-8E2F-202799854F91}"
14+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PCLExt.FileStorage.iOS.Test", "test\PCLExt.FileStorage.iOS.Test\PCLExt.FileStorage.iOS.Test.csproj", "{12AB9E53-8A6F-4B3A-8E2F-202799854F91}"
1515
EndProject
1616
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PCLExt.FileStorage.NetFX", "src\PCLExt.FileStorage.NetFX\PCLExt.FileStorage.NetFX.csproj", "{54DBACEB-B898-494B-AD88-2A407CB55A5A}"
1717
EndProject
1818
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PCLExt.FileStorage.macOS", "src\PCLExt.FileStorage.macOS\PCLExt.FileStorage.macOS.csproj", "{0B02DE9A-C3C5-4DB9-B87F-6B05C3566946}"
1919
EndProject
20-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PCLExt.FileStorage.Core.Test", "src\PCLExt.FileStorage.Core.Test\PCLExt.FileStorage.Core.Test.csproj", "{316FFBA8-57A8-4B4A-8352-F1E3361D8710}"
20+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PCLExt.FileStorage.Core.Test", "test\PCLExt.FileStorage.Core.Test\PCLExt.FileStorage.Core.Test.csproj", "{316FFBA8-57A8-4B4A-8352-F1E3361D8710}"
2121
EndProject
22-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PCLExt.FileStorage.NetFX.Test", "src\PCLExt.FileStorage.NetFX.Test\PCLExt.FileStorage.NetFX.Test.csproj", "{119368DE-E6BD-4746-BCD8-BBFE458579CC}"
22+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PCLExt.FileStorage.NetFX.Test", "test\PCLExt.FileStorage.NetFX.Test\PCLExt.FileStorage.NetFX.Test.csproj", "{119368DE-E6BD-4746-BCD8-BBFE458579CC}"
2323
EndProject
2424
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PCLExt.FileStorage.Standard.Abstractions", "src\PCLExt.FileStorage.Standard.Abstractions\PCLExt.FileStorage.Standard.Abstractions.csproj", "{5D529A12-F49C-40FE-B3C3-17747D73879E}"
2525
EndProject
2626
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PCLExt.FileStorage.Portable111", "src\PCLExt.FileStorage.Portable111\PCLExt.FileStorage.Portable111.csproj", "{A7C97A2B-F996-4CAF-87D8-F3A60B2B4D44}"
2727
EndProject
2828
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PCLExt.FileStorage.UWP", "src\PCLExt.FileStorage.UWP\PCLExt.FileStorage.UWP.csproj", "{D09BEB59-933D-4446-90FA-C8760705E8E4}"
2929
EndProject
30-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PCLExt.FileStorage.UWP.Test", "src\PCLExt.FileStorage.UWP.Test\PCLExt.FileStorage.UWP.Test.csproj", "{9E934708-D6C7-48E3-9E95-13144C4E86B5}"
30+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PCLExt.FileStorage.UWP.Test", "test\PCLExt.FileStorage.UWP.Test\PCLExt.FileStorage.UWP.Test.csproj", "{9E934708-D6C7-48E3-9E95-13144C4E86B5}"
3131
EndProject
3232
Global
3333
GlobalSection(SolutionConfigurationPlatforms) = preSolution

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
**Mono Latest:** | **Windows .NET 4.5:** | **NuGet**
1+
**Mono Latest:** | **.NET 4.5 & .NET Core:** | **NuGet**
22
------------ | ------------- | -------------
3-
| | | [![nugetpkg](https://img.shields.io/badge/nuget-PCLExt.FileStorage-orange.svg)](https://www.nuget.org/packages/PCLExt.FileStorage)
3+
| | [![Build status](https://ci.appveyor.com/api/projects/status/puku2ym0k1n7ryde?svg=true)](https://ci.appveyor.com/project/Aragas/pclext-filestorage) | [![nugetpkg](https://img.shields.io/badge/nuget-PCLExt.FileStorage-orange.svg)](https://www.nuget.org/packages/PCLExt.FileStorage)
44

55
# PCLExt.FileStorage
66

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
os: Visual Studio 2015
1+
os: Visual Studio 2017
22

33
configuration:
44
- Debug

common/PCLExt.FileStorage.nuspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<id>PCLExt.FileStorage</id>
55
<version>1.3.1.0</version>
66
<title>PCL Extension - File Storage API</title>
7-
<authors>Daniel Plaisted,Aragas</authors>
7+
<authors>Daniel Plaisted, Aragas</authors>
88
<owners>Aragas</owners>
99
<licenseUrl>https://github.com/Aragas/PCLExt.FileStorage/blob/master/LICENSE</licenseUrl>
1010
<projectUrl>https://github.com/Aragas/PCLExt.FileStorage</projectUrl>
@@ -50,4 +50,4 @@
5050
<file src="..\src\PCLExt.FileStorage.macOS\bin\Release\PCLExt.FileStorage.dll" target="lib\Xamarin.Mac20\PCLExt.FileStorage.dll" />
5151
<file src="..\src\PCLExt.FileStorage.macOS\bin\Release\PCLExt.FileStorage.xml" target="lib\Xamarin.Mac20\PCLExt.FileStorage.xml" />
5252
</files>
53-
</package>
53+
</package>

src/PCLExt.FileStorage.NetFX.Test/packages.config

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/PCLExt.FileStorage.Portable111/Extensions/FolderExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public static IFile GetFileFromPath(this IFolder folder, params string[] folders
7777

7878

7979

80-
#if DESKTOP || MAC || NETSTANDARD2_0
80+
#if DESKTOP || __MACOS__ || NETSTANDARD2_0
8181
// https://github.com/mono/mono/blob/master/mcs/class/System.Windows.Forms/System.Windows.Forms/Application.cs
8282
private static string CompanyName
8383
{

src/PCLExt.FileStorage.Portable111/Files/FileFromPath.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ private static IFile GetFileFromPath(string path)
1414
{
1515
Requires.NotNullOrEmpty(path, "path");
1616

17-
#if DESKTOP || ANDROID || __IOS__ || MAC || NETSTANDARD2_0
18-
if(System.IO.File.Exists(path))
17+
#if DESKTOP || ANDROID || __IOS__ || __MACOS__ || NETSTANDARD2_0
18+
if (System.IO.File.Exists(path))
1919
return new DefaultFileImplementation(path);
2020
else
2121
throw new Exceptions.FileNotFoundException($"File does not exists on {path}");

src/PCLExt.FileStorage.Portable111/Folders/ApplicationRootFolder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ private static IFolder GetApplicationFolder()
1616
return null;
1717
#elif __IOS__
1818
return new DefaultFolderImplementation(Foundation.NSBundle.MainBundle.BundlePath);
19-
#elif DESKTOP || MAC
19+
#elif DESKTOP || __MACOS__
2020
return new DefaultFolderImplementation(System.AppDomain.CurrentDomain.BaseDirectory);
2121
#elif NETSTANDARD2_0
2222
return new DefaultFolderImplementation(System.AppContext.BaseDirectory);

src/PCLExt.FileStorage.Portable111/Folders/DocumentsRootFolder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ private static IFolder GetDocumentsFolder()
1616
{
1717
#if ANDROID || __IOS__
1818
return new DefaultFolderImplementation(System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments));
19-
#elif DESKTOP || MAC || NETSTANDARD2_0
19+
#elif DESKTOP || __MACOS__ || NETSTANDARD2_0
2020
return new DefaultFolderImplementation(System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments)).GetDataFolder();
2121
#elif WINDOWS_UWP
2222
return null;

0 commit comments

Comments
 (0)