-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
112 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": [ | ||
"github>cake-contrib/renovate-presets" | ||
], | ||
"packageRules": [ | ||
{ | ||
"description": "Group Azure DevOps packages together", | ||
"matchManagers": [ | ||
"nuget" | ||
], | ||
"matchPackagePatterns": [ | ||
"Microsoft.TeamFoundationServer.Client|Microsoft.VisualStudio.Services.InteractiveClient" | ||
], | ||
"groupName": "Azure DevOps Client" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"dotnet.defaultSolution": "src\\Cake.AzureDevOps.sln" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"sdk": { | ||
"allowPrerelease": true, | ||
"version": "7.0.100", | ||
"version": "7.0.401", | ||
"rollForward": "latestFeature" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
src/Cake.AzureDevOps.Tests/Pipelines/ArtifactResourceExtensionsTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
namespace Cake.AzureDevOps.Tests.Pipelines | ||
{ | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using Cake.AzureDevOps.Pipelines; | ||
using Cake.Common.Build.AzurePipelines.Data; | ||
using Microsoft.TeamFoundation.Build.WebApi; | ||
using Shouldly; | ||
using Xunit; | ||
|
||
// ReSharper disable once ClassNeverInstantiated.Global | ||
public sealed class ArtifactResourceExtensionsTests | ||
{ | ||
public sealed class TheToAzureDevOpsArtifactResourceExtensionMethod | ||
{ | ||
[Fact] | ||
public void Should_Return_The_Correct_AzureDevOpsArtifactResource_For_ArtifactResource() | ||
{ | ||
// Given | ||
var artifactResource = new ArtifactResource() | ||
{ | ||
Data = "data", | ||
DownloadUrl = "downloadUrl", | ||
Url = "url", | ||
Type = "FilePath", | ||
Properties = new Dictionary<string, string>() | ||
{ | ||
{ "foo", "bar" }, | ||
}, | ||
}; | ||
|
||
// When | ||
var result = artifactResource.ToAzureDevOpsArtifactResource(); | ||
|
||
// Then | ||
result.Data.ShouldBe(artifactResource.Data); | ||
result.DownloadUrl.ShouldBe(artifactResource.DownloadUrl); | ||
result.Url.ShouldBe(artifactResource.Url); | ||
result.Type.ShouldBe(AzurePipelinesArtifactType.FilePath); | ||
result.Properties.Count.ShouldBe(1); | ||
result.Properties.Single().Key.ShouldBe(artifactResource.Properties.Single().Key); | ||
result.Properties.Single().Value.ShouldBe(artifactResource.Properties.Single().Value); | ||
} | ||
|
||
[Theory] | ||
[InlineData("container", AzurePipelinesArtifactType.Container)] | ||
[InlineData("Container", AzurePipelinesArtifactType.Container)] | ||
[InlineData("FilePath", AzurePipelinesArtifactType.FilePath)] | ||
[InlineData("filepath", AzurePipelinesArtifactType.FilePath)] | ||
[InlineData("GitRef", AzurePipelinesArtifactType.GitRef)] | ||
[InlineData("gitref", AzurePipelinesArtifactType.GitRef)] | ||
[InlineData("TFVCLabel", AzurePipelinesArtifactType.TFVCLabel)] | ||
[InlineData("tfvclabel", AzurePipelinesArtifactType.TFVCLabel)] | ||
[InlineData("VersionControl", AzurePipelinesArtifactType.VersionControl)] | ||
[InlineData("versioncontrol", AzurePipelinesArtifactType.VersionControl)] | ||
|
||
public void Should_Return_The_Correct_AzureDevOpsArtifactResource_Type_EnumValue_Independent_The_ArtifactResource_Type_String_Casing(string typeString, AzurePipelinesArtifactType expectedResult) | ||
{ | ||
// Given | ||
var artifactResource = new ArtifactResource() | ||
{ | ||
Type = typeString, | ||
}; | ||
|
||
// When | ||
var result = artifactResource.ToAzureDevOpsArtifactResource(); | ||
|
||
// Then | ||
result.Type.ShouldBe(expectedResult); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters