Skip to content

Commit

Permalink
Use Arcade (dotnet/extensions#586)
Browse files Browse the repository at this point in the history
Use arcade


Commit migrated from dotnet/extensions@f045899
  • Loading branch information
ryanbrandenburg committed Jan 29, 2019
1 parent bd72908 commit 10a63de
Show file tree
Hide file tree
Showing 93 changed files with 313 additions and 214 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />

<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)..\ParameterDefaultValue\ParameterDefaultValue.cs">
<Pack>true</Pack>
<PackagePath>$(ContentTargetFolders)\cs\netstandard1.0\</PackagePath>
</Compile>
</ItemGroup>

<Target Name="Compile" />
<Target Name="CopyFilesToOutputDirectory" />
</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<Project>
<PropertyGroup>
<IsShipping>false</IsShipping>
</PropertyGroup>

<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)..\ParameterDefaultValue\ParameterDefaultValue.cs">
<Pack>true</Pack>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />

<Target Name="Compile" />
<Target Name="CopyFilesToOutputDirectory" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />

<Target Name="Compile" />
<Target Name="CopyFilesToOutputDirectory" />
</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
Expand Down

This file was deleted.

26 changes: 24 additions & 2 deletions src/libraries/Common/src/Extensions/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,9 +1,31 @@
<Project>

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory)..\, Directory.Build.props))\Directory.Build.props" />

<PropertyGroup>
<!-- This does not represent the TFM for the code. It's only here because /t:Pack requires it. -->
<TargetFramework>netstandard1.0</TargetFramework>
<IsPackable>true</IsPackable>
<IsShipping>false</IsShipping>
<NoBuild>true</NoBuild>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<EnableDefaultItems>false</EnableDefaultItems>
<IncludeBuildOutput>false</IncludeBuildOutput>
<IncludeSymbols>false</IncludeSymbols>
<PackageId>Microsoft.Extensions.$(ProjectDirName).Sources</PackageId>
<ContentTargetFolders>contentFiles</ContentTargetFolders>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
<DefaultExcludeItems>$(DefaultExcludeItems);$(BaseOutputPath);$(BaseIntermediateOutputPath);</DefaultExcludeItems>
<NoWarn>$(NoWarn);NU5105;CS8021</NoWarn>
</PropertyGroup>

<ItemGroup>
<Compile Include="$(MSBuildProjectDirectory)\**\*.cs" Exclude="$(DefaultExcludeItems)">
<Pack>true</Pack>
<PackagePath>$(ContentTargetFolders)\cs\netstandard1.0\shared\</PackagePath>
</Compile>
<EmbeddedResource Include="$(MSBuildProjectDirectory)\**\*.resx" Exclude="$(DefaultExcludeItems)">
<Pack>true</Pack>
<PackagePath>$(ContentTargetFolders)\any\any\shared\</PackagePath>
</EmbeddedResource>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />

<Target Name="Compile" />
<Target Name="CopyFilesToOutputDirectory" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />

<Target Name="Compile" />
<Target Name="CopyFilesToOutputDirectory" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />

<Target Name="Compile" />
<Target Name="CopyFilesToOutputDirectory" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />

<Target Name="Compile" />
<Target Name="CopyFilesToOutputDirectory" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />

<Target Name="Compile" />
<Target Name="CopyFilesToOutputDirectory" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@
<PackageTags>aspnetcore</PackageTags>
<EnableApiCheck>false</EnableApiCheck>
<IsPackable>true</IsPackable>
<IsShipping>false</IsShipping>
<!-- This package is internal, so we don't generate a package baseline. Always build against the latest dependencies. -->
<UseLatestPackageReferences>true</UseLatestPackageReferences>
</PropertyGroup>

<ItemGroup>
<InternalsVisibleTo Include="Microsoft.AspNetCore.Testing.Tests" />
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Win32.Registry" />
<Reference Include="System.ValueTuple" />
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System;
Expand All @@ -8,6 +8,11 @@ namespace Microsoft.AspNetCore.Testing
{
public class TestPathUtilities
{
public static string GetRepoRootDirectory()
{
return GetSolutionRootDirectory("Extensions");
}

public static string GetSolutionRootDirectory(string solution)
{
var applicationBasePath = AppContext.BaseDirectory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ protected override IXunitTestCase CreateTestCase(ITestFrameworkDiscoveryOptions
{
var skipReason = testMethod.EvaluateSkipConditions();
return skipReason != null
? new SkippedTestCase(skipReason, _diagnosticMessageSink, discoveryOptions.MethodDisplayOrDefault(), testMethod)
? new SkippedTestCase(skipReason, _diagnosticMessageSink, discoveryOptions.MethodDisplayOrDefault(), TestMethodDisplayOptions.None, testMethod)
: base.CreateTestCase(discoveryOptions, testMethod, factAttribute);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ namespace Microsoft.AspNetCore.Testing.xunit
public class ConditionalTheoryAttribute : TheoryAttribute
{
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,30 @@ public ConditionalTheoryDiscoverer(IMessageSink diagnosticMessageSink)
{
}

private sealed class OptionsWithPreEnumerationEnabled : ITestFrameworkDiscoveryOptions
{
private const string PreEnumerateTheories = "xunit.discovery.PreEnumerateTheories";

private readonly ITestFrameworkDiscoveryOptions _original;

public OptionsWithPreEnumerationEnabled(ITestFrameworkDiscoveryOptions original)
=> _original = original;

public TValue GetValue<TValue>(string name)
=> (name == PreEnumerateTheories) ? (TValue)(object)true : _original.GetValue<TValue>(name);

public void SetValue<TValue>(string name, TValue value)
=> _original.SetValue(name, value);
}

public override IEnumerable<IXunitTestCase> Discover(ITestFrameworkDiscoveryOptions discoveryOptions, ITestMethod testMethod, IAttributeInfo theoryAttribute)
=> base.Discover(new OptionsWithPreEnumerationEnabled(discoveryOptions), testMethod, theoryAttribute);

protected override IEnumerable<IXunitTestCase> CreateTestCasesForTheory(ITestFrameworkDiscoveryOptions discoveryOptions, ITestMethod testMethod, IAttributeInfo theoryAttribute)
{
var skipReason = testMethod.EvaluateSkipConditions();
return skipReason != null
? new[] { new SkippedTestCase(skipReason, DiagnosticMessageSink, discoveryOptions.MethodDisplayOrDefault(), testMethod) }
? new[] { new SkippedTestCase(skipReason, DiagnosticMessageSink, discoveryOptions.MethodDisplayOrDefault(), TestMethodDisplayOptions.None, testMethod) }
: base.CreateTestCasesForTheory(discoveryOptions, testMethod, theoryAttribute);
}

Expand All @@ -44,4 +63,4 @@ protected override IEnumerable<IXunitTestCase> CreateTestCasesForDataRow(ITestFr
: base.CreateTestCasesForDataRow(discoveryOptions, testMethod, theoryAttribute, dataRow);
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System;
Expand All @@ -16,8 +16,14 @@ public SkippedTestCase() : base()
{
}

public SkippedTestCase(string skipReason, IMessageSink diagnosticMessageSink, TestMethodDisplay defaultMethodDisplay, ITestMethod testMethod, object[] testMethodArguments = null)
: base(diagnosticMessageSink, defaultMethodDisplay, testMethod, testMethodArguments)
public SkippedTestCase(
string skipReason,
IMessageSink diagnosticMessageSink,
TestMethodDisplay defaultMethodDisplay,
TestMethodDisplayOptions defaultMethodDisplayOptions,
ITestMethod testMethod,
object[] testMethodArguments = null)
: base(diagnosticMessageSink, defaultMethodDisplay, defaultMethodDisplayOptions, testMethod, testMethodArguments)
{
_skipReason = skipReason;
}
Expand All @@ -37,4 +43,4 @@ public override void Serialize(IXunitSerializationInfo data)
data.AddValue(nameof(_skipReason), _skipReason);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,4 @@
<ItemGroup Condition="'$(TargetFramework)' == 'net461'">
<Reference Include="System.Net.Http" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public void GetSolutionRootDirectory_ResolvesSolutionRoot()
// Testing\test\Microsoft.AspNetCore.Testing.Tests\bin\Debug\netcoreapp2.0
// Testing\test\Microsoft.AspNetCore.Testing.Tests\bin\Debug\net461
// Testing\test\Microsoft.AspNetCore.Testing.Tests\bin\Debug\net46
var expectedPath = Path.GetFullPath(Path.Combine(Directory.GetCurrentDirectory(), "..", "..", "..", "..", "..", "..", ".."));
var expectedPath = Path.GetFullPath(Path.Combine(Directory.GetCurrentDirectory(), "..", "..", "..", "..", ".."));

Assert.Equal(expectedPath, TestPathUtilities.GetSolutionRootDirectory("Extensions"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@

<PropertyGroup>
<IsProductComponent>true</IsProductComponent>
<IsPackable>true</IsPackable>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@
<NoWarn>$(NoWarn);CS1591</NoWarn>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageTags>cache;memorycache</PackageTags>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
<InternalsVisibleTo Include="Microsoft.Extensions.Caching.Memory.Tests" />
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Extensions.Caching.Abstractions" />
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Microsoft.Extensions.Configuration.IConfigurationBuilder
Microsoft.Extensions.Configuration.IConfigurationProvider
Microsoft.Extensions.Configuration.IConfigurationRoot
Microsoft.Extensions.Configuration.IConfigurationSection</Description>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@
<PropertyGroup>
<Description>Functionality to bind an object to data in configuration providers for Microsoft.Extensions.Configuration.</Description>
<TargetFramework>netstandard2.0</TargetFramework>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
<InternalsVisibleTo Include="Microsoft.Extensions.Configuration.Binder.Tests" />
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Extensions.Configuration" />
</ItemGroup>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@
<Description>Command line configuration provider implementation for Microsoft.Extensions.Configuration.</Description>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageTags>$(PackageTags);commandline</PackageTags>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
<InternalsVisibleTo Include="Microsoft.Extensions.Configuration.CommandLine.Tests" />
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Extensions.Configuration" />
</ItemGroup>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@
<Description>Environment variables configuration provider implementation for Microsoft.Extensions.Configuration.</Description>
<TargetFramework>netstandard2.0</TargetFramework>
<PackageTags>$(PackageTags);envvar;environmentvariable</PackageTags>
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
<InternalsVisibleTo Include="Microsoft.Extensions.Configuration.EnvironmentVariables.Tests" />
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.Extensions.Configuration" />
</ItemGroup>
Expand Down

This file was deleted.

Loading

0 comments on commit 10a63de

Please sign in to comment.