Skip to content

Commit

Permalink
Merge branch 'release/1.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
phillipsj committed Oct 2, 2018
2 parents 709a2d1 + 3beaf7f commit 7b66952
Show file tree
Hide file tree
Showing 14 changed files with 303 additions and 278 deletions.
5 changes: 5 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#---------------------------------#
# Build Image #
#---------------------------------#
image: Visual Studio 2017

#---------------------------------#
# Build Script #
#---------------------------------#
Expand Down
6 changes: 3 additions & 3 deletions nuspec/nuget/Cake.Ftp.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
<tags>CakeFtp, Cake, Ftp, Script, Build, Addin</tags>
</metadata>
<files>
<file src="Cake.Ftp.dll" target="lib\net45" />
<file src="Cake.Ftp.pdb" target="lib\net45" />
<file src="Cake.Ftp.xml" target="lib\net45" />
<file src="netstandard2.0\Cake.Ftp.dll" target="lib\netstandard2.0" />
<file src="netstandard2.0\Cake.Ftp.pdb" target="lib\netstandard2.0" />
<file src="netstandard2.0\Cake.Ftp.xml" target="lib\netstandard2.0" />
</files>
</package>
6 changes: 4 additions & 2 deletions setup.cake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ BuildParameters.SetParameters(context: Context,
title: "Cake.Ftp",
repositoryOwner: "cake-contrib",
repositoryName: "Cake.Ftp",
appVeyorAccountName: "cakecontrib");
appVeyorAccountName: "cakecontrib",
shouldRunDupFinder: false,
shouldRunInspectCode: false);

BuildParameters.PrintParameters(Context);

Expand All @@ -18,4 +20,4 @@ ToolSettings.SetToolSettings(context: Context,
testCoverageFilter: "+[*]* -[xunit.*]* -[Cake.Core]* -[Cake.Testing]* -[*.Tests]* ",
testCoverageExcludeByAttribute: "*.ExcludeFromCodeCoverage*",
testCoverageExcludeByFile: "*/*Designer.cs;*/*.g.cs;*/*.g.i.cs");
Build.Run();
Build.RunDotNetCore();
100 changes: 19 additions & 81 deletions src/Cake.Ftp.Tests/Cake.Ftp.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,87 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{5F129555-2839-42FE-AB4B-72B9F6B6EBE6}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Cake.Ftp.Tests</RootNamespace>
<AssemblyName>Cake.Ftp.Tests</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
<TargetFramework>netcoreapp2.1</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Cake.Core, Version=0.22.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Cake.Core.0.22.2\lib\net46\Cake.Core.dll</HintPath>
</Reference>
<Reference Include="Cake.Testing, Version=0.22.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Cake.Testing.0.22.2\lib\net46\Cake.Testing.dll</HintPath>
</Reference>
<Reference Include="NSubstitute, Version=2.0.3.0, Culture=neutral, PublicKeyToken=92dd2e9066daa5ca, processorArchitecture=MSIL">
<HintPath>..\packages\NSubstitute.2.0.3\lib\net45\NSubstitute.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="xunit.abstractions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<HintPath>..\packages\xunit.abstractions.2.0.1\lib\net35\xunit.abstractions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="xunit.assert, Version=2.2.0.3545, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<HintPath>..\packages\xunit.assert.2.2.0\lib\netstandard1.1\xunit.assert.dll</HintPath>
</Reference>
<Reference Include="xunit.core, Version=2.2.0.3545, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<HintPath>..\packages\xunit.extensibility.core.2.2.0\lib\netstandard1.1\xunit.core.dll</HintPath>
</Reference>
<Reference Include="xunit.execution.desktop, Version=2.2.0.3545, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c, processorArchitecture=MSIL">
<HintPath>..\packages\xunit.extensibility.execution.2.2.0\lib\net452\xunit.execution.desktop.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Fixtures\FtpClientFixture.cs" />
<Compile Include="FtpTests.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Cake.Ftp\Cake.Ftp.csproj">
<Project>{6D4530F4-F5F6-456F-92B7-685CB5A01887}</Project>
<Name>Cake.Ftp</Name>
</ProjectReference>
<PackageReference Include="Cake.Testing" Version="0.28.0" />
<PackageReference Include="FluentAssertions" Version="5.4.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0" />
<PackageReference Include="NSubstitute" Version="3.1.0" />
<PackageReference Include="xunit" Version="2.4.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<None Include="packages.config" />
<ProjectReference Include="..\Cake.Ftp\Cake.Ftp.csproj" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

</Project>
55 changes: 28 additions & 27 deletions src/Cake.Ftp.Tests/FtpTests.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using Cake.Ftp.Tests.Fixtures;
using FluentAssertions;
using Xunit;
using Cake.Testing;

namespace Cake.Ftp.Tests {
public sealed class FtpTests {
Expand All @@ -15,8 +15,8 @@ public void Should_Throw_If_File_System_Is_Null() {
var result = Record.Exception(() => fixture.UploadFile());

// Then
Assert.IsType<ArgumentNullException>(result);
Assert.Equal("fileSystem", ((ArgumentNullException)result).ParamName);
result.Should().BeOfType<ArgumentNullException>().Subject
.ParamName.Should().Equals("fileSystem");
}

[Fact]
Expand All @@ -28,8 +28,8 @@ public void Should_Throw_If_Cake_Environment_Is_Null() {
var result = Record.Exception(() => fixture.UploadFile());

// Then
Assert.IsType<ArgumentNullException>(result);
Assert.Equal("environment", ((ArgumentNullException)result).ParamName);
result.Should().BeOfType<ArgumentNullException>().Subject
.ParamName.Should().Equals("environment");
}

[Fact]
Expand All @@ -41,8 +41,8 @@ public void Should_Throw_If_FTP_Service_Is_Null() {
var result = Record.Exception(() => fixture.UploadFile());

// Then
Assert.IsType<ArgumentNullException>(result);
Assert.Equal("ftpService", ((ArgumentNullException)result).ParamName);
result.Should().BeOfType<ArgumentNullException>().Subject
.ParamName.Should().Equals("ftpService");
}
}

Expand All @@ -56,8 +56,8 @@ public void Should_Throw_If_Server_Uri_Is_Null() {
var result = Record.Exception(() => fixture.UploadFile());

// Then
Assert.IsType<ArgumentNullException>(result);
Assert.Equal("serverUri", ((ArgumentNullException)result).ParamName);
result.Should().BeOfType<ArgumentNullException>().Subject
.ParamName.Should().Equals("serverUri");
}

[Fact]
Expand All @@ -69,8 +69,8 @@ public void Should_Throw_If_File_To_Upload_Is_Null() {
var result = Record.Exception(() => fixture.UploadFile());

// Then
Assert.IsType<ArgumentNullException>(result);
Assert.Equal("fileToUpload", ((ArgumentNullException)result).ParamName);
result.Should().BeOfType<ArgumentNullException>().Subject
.ParamName.Should().Equals("fileToUpload");
}

[Fact]
Expand All @@ -82,8 +82,8 @@ public void Should_Throw_If_Username_Is_Null() {
var result = Record.Exception(() => fixture.UploadFile());

// Then
Assert.IsType<ArgumentNullException>(result);
Assert.Equal("Username", ((ArgumentNullException)result).ParamName);
result.Should().BeOfType<ArgumentNullException>().Subject
.ParamName.Should().Equals("Username");
}

[Fact]
Expand All @@ -95,8 +95,8 @@ public void Should_Throw_If_Password_Is_Null() {
var result = Record.Exception(() => fixture.UploadFile());

// Then
Assert.IsType<ArgumentNullException>(result);
Assert.Equal("Password", ((ArgumentNullException)result).ParamName);
result.Should().BeOfType<ArgumentNullException>().Subject
.ParamName.Should().Equals("Password");
}

[Fact]
Expand All @@ -108,8 +108,8 @@ public void Should_Throw_If_Url_Is_Not_FTP_Scheme() {
var result = Record.Exception(() => fixture.UploadFile());

// Then
Assert.IsType<ArgumentOutOfRangeException>(result);
Assert.Equal("serverUri", ((ArgumentOutOfRangeException)result).ParamName);
result.Should().BeOfType<ArgumentOutOfRangeException>().Subject
.ParamName.Should().Equals("serverUri");
}

[Fact]
Expand All @@ -121,7 +121,7 @@ public void Should_Upload_File_Without_Error() {
var result = Record.Exception(() => fixture.UploadFile());

// Then
Assert.Equal(null, result);
result.Should().BeNull();
}
}

Expand All @@ -135,8 +135,9 @@ public void Should_Throw_If_Server_Uri_Is_Null() {
var result = Record.Exception(() => fixture.DeleteFile());

// Then
Assert.IsType<ArgumentNullException>(result);
Assert.Equal("serverUri", ((ArgumentNullException)result).ParamName);
result.Should().BeOfType<ArgumentNullException>().Subject
.ParamName.Should().Equals("serverUri");

}

[Fact]
Expand All @@ -148,8 +149,8 @@ public void Should_Throw_If_Username_Is_Null() {
var result = Record.Exception(() => fixture.DeleteFile());

// Then
Assert.IsType<ArgumentNullException>(result);
Assert.Equal("Username", ((ArgumentNullException)result).ParamName);
result.Should().BeOfType<ArgumentNullException>().Subject
.ParamName.Should().Equals("Username");
}

[Fact]
Expand All @@ -161,8 +162,8 @@ public void Should_Throw_If_Password_Is_Null() {
var result = Record.Exception(() => fixture.DeleteFile());

// Then
Assert.IsType<ArgumentNullException>(result);
Assert.Equal("Password", ((ArgumentNullException)result).ParamName);
result.Should().BeOfType<ArgumentNullException>().Subject
.ParamName.Should().Equals("Password");
}

[Fact]
Expand All @@ -174,8 +175,8 @@ public void Should_Throw_If_Url_Is_Not_FTP_Scheme() {
var result = Record.Exception(() => fixture.DeleteFile());

// Then
Assert.IsType<ArgumentOutOfRangeException>(result);
Assert.Equal("serverUri", ((ArgumentOutOfRangeException)result).ParamName);
result.Should().BeOfType<ArgumentOutOfRangeException>().Subject
.ParamName.Should().Equals("serverUri");
}

[Fact]
Expand All @@ -187,7 +188,7 @@ public void Should_Delete_File_Without_Error() {
var result = Record.Exception(() => fixture.DeleteFile());

// Then
Assert.Equal(null, result);
result.Should().BeNull();
}
}
}
Expand Down
36 changes: 0 additions & 36 deletions src/Cake.Ftp.Tests/Properties/AssemblyInfo.cs

This file was deleted.

11 changes: 0 additions & 11 deletions src/Cake.Ftp.Tests/packages.config

This file was deleted.

27 changes: 15 additions & 12 deletions src/Cake.Ftp.sln
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
# Visual Studio 15
VisualStudioVersion = 15.0.28010.2036
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cake.Ftp", "Cake.Ftp\Cake.Ftp.csproj", "{6D4530F4-F5F6-456F-92B7-685CB5A01887}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cake.Ftp.Tests", "Cake.Ftp.Tests\Cake.Ftp.Tests.csproj", "{58263244-85AE-4A30-B3F2-2AE8DF4AB1AA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cake.Ftp.Tests", "Cake.Ftp.Tests\Cake.Ftp.Tests.csproj", "{5F129555-2839-42FE-AB4B-72B9F6B6EBE6}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cake.Ftp", "Cake.Ftp\Cake.Ftp.csproj", "{CAB6CDD6-E2B9-4657-B933-0F428C22151A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6D4530F4-F5F6-456F-92B7-685CB5A01887}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6D4530F4-F5F6-456F-92B7-685CB5A01887}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6D4530F4-F5F6-456F-92B7-685CB5A01887}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6D4530F4-F5F6-456F-92B7-685CB5A01887}.Release|Any CPU.Build.0 = Release|Any CPU
{5F129555-2839-42FE-AB4B-72B9F6B6EBE6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5F129555-2839-42FE-AB4B-72B9F6B6EBE6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5F129555-2839-42FE-AB4B-72B9F6B6EBE6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5F129555-2839-42FE-AB4B-72B9F6B6EBE6}.Release|Any CPU.Build.0 = Release|Any CPU
{58263244-85AE-4A30-B3F2-2AE8DF4AB1AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{58263244-85AE-4A30-B3F2-2AE8DF4AB1AA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{58263244-85AE-4A30-B3F2-2AE8DF4AB1AA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{58263244-85AE-4A30-B3F2-2AE8DF4AB1AA}.Release|Any CPU.Build.0 = Release|Any CPU
{CAB6CDD6-E2B9-4657-B933-0F428C22151A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CAB6CDD6-E2B9-4657-B933-0F428C22151A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CAB6CDD6-E2B9-4657-B933-0F428C22151A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CAB6CDD6-E2B9-4657-B933-0F428C22151A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {61CD2000-94FE-4C8A-9DEC-0DD9903E6633}
EndGlobalSection
EndGlobal
Loading

0 comments on commit 7b66952

Please sign in to comment.