Skip to content

Commit e6cc170

Browse files
author
John Luo
authored
Compile using ref assemblies (dotnet/extensions#2483)
* Compile using ref assemblies * Use updated ResolveReferences.target from AspNetCore * Generate ref assemblies for .NET framework\n\nCommit migrated from dotnet/extensions@e771c42
1 parent 0a35cd7 commit e6cc170

File tree

4 files changed

+572
-0
lines changed

4 files changed

+572
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<!-- This file is automatically generated. -->
2+
<Project Sdk="Microsoft.NET.Sdk">
3+
<PropertyGroup>
4+
<TargetFrameworks>netstandard2.0;net46</TargetFrameworks>
5+
</PropertyGroup>
6+
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
7+
<Compile Include="Microsoft.AspNetCore.Testing.netstandard2.0.cs" />
8+
<Reference Include="Microsoft.Win32.Registry" />
9+
<Reference Include="System.ValueTuple" />
10+
<Reference Include="xunit.assert" />
11+
<Reference Include="xunit.extensibility.execution" />
12+
</ItemGroup>
13+
<ItemGroup Condition="'$(TargetFramework)' == 'net46'">
14+
<Compile Include="Microsoft.AspNetCore.Testing.net46.cs" />
15+
<Reference Include="Microsoft.Win32.Registry" />
16+
<Reference Include="System.ValueTuple" />
17+
<Reference Include="xunit.assert" />
18+
<Reference Include="xunit.extensibility.execution" />
19+
<Reference Include="System.Net.Http" />
20+
<Reference Include="System.Runtime.InteropServices.RuntimeInformation" />
21+
<Reference Include="System" />
22+
<Reference Include="System.Data" />
23+
<Reference Include="System.Drawing" />
24+
<Reference Include="System.Xml" />
25+
<Reference Include="System.Core" />
26+
<Reference Include="System.Runtime.Serialization" />
27+
<Reference Include="System.Xml.Linq" />
28+
<Reference Include="System.Numerics" />
29+
<Reference Include="System.IO.Compression.FileSystem" />
30+
<Reference Include="mscorlib" />
31+
</ItemGroup>
32+
</Project>
Lines changed: 269 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,269 @@
1+
// Copyright (c) .NET Foundation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3+
4+
namespace Microsoft.AspNetCore.Testing
5+
{
6+
[System.AttributeUsageAttribute(System.AttributeTargets.Method, AllowMultiple=false)]
7+
[Xunit.Sdk.XunitTestCaseDiscovererAttribute("Microsoft.AspNetCore.Testing.ConditionalFactDiscoverer", "Microsoft.AspNetCore.Testing")]
8+
public partial class ConditionalFactAttribute : Xunit.FactAttribute
9+
{
10+
public ConditionalFactAttribute() { }
11+
}
12+
[System.AttributeUsageAttribute(System.AttributeTargets.Method, AllowMultiple=false)]
13+
[Xunit.Sdk.XunitTestCaseDiscovererAttribute("Microsoft.AspNetCore.Testing.ConditionalTheoryDiscoverer", "Microsoft.AspNetCore.Testing")]
14+
public partial class ConditionalTheoryAttribute : Xunit.TheoryAttribute
15+
{
16+
public ConditionalTheoryAttribute() { }
17+
}
18+
public partial class CultureReplacer : System.IDisposable
19+
{
20+
public CultureReplacer(System.Globalization.CultureInfo culture, System.Globalization.CultureInfo uiCulture) { }
21+
public CultureReplacer(string culture = "en-GB", string uiCulture = "en-US") { }
22+
public static System.Globalization.CultureInfo DefaultCulture { get { throw null; } }
23+
public static string DefaultCultureName { get { throw null; } }
24+
public static string DefaultUICultureName { get { throw null; } }
25+
public void Dispose() { }
26+
}
27+
[System.AttributeUsageAttribute(System.AttributeTargets.Method, Inherited=true, AllowMultiple=false)]
28+
public sealed partial class DockerOnlyAttribute : System.Attribute, Microsoft.AspNetCore.Testing.ITestCondition
29+
{
30+
public DockerOnlyAttribute() { }
31+
public bool IsMet { get { throw null; } }
32+
public string SkipReason { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
33+
}
34+
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true)]
35+
public partial class EnvironmentVariableSkipConditionAttribute : System.Attribute, Microsoft.AspNetCore.Testing.ITestCondition
36+
{
37+
public EnvironmentVariableSkipConditionAttribute(string variableName, params string[] values) { }
38+
public bool IsMet { get { throw null; } }
39+
public bool RunOnMatch { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
40+
public string SkipReason { get { throw null; } }
41+
}
42+
public static partial class ExceptionAssert
43+
{
44+
public static System.ArgumentException ThrowsArgument(System.Action testCode, string paramName, string exceptionMessage) { throw null; }
45+
public static System.Threading.Tasks.Task<System.ArgumentException> ThrowsArgumentAsync(System.Func<System.Threading.Tasks.Task> testCode, string paramName, string exceptionMessage) { throw null; }
46+
public static System.ArgumentNullException ThrowsArgumentNull(System.Action testCode, string paramName) { throw null; }
47+
public static System.ArgumentException ThrowsArgumentNullOrEmpty(System.Action testCode, string paramName) { throw null; }
48+
public static System.Threading.Tasks.Task<System.ArgumentException> ThrowsArgumentNullOrEmptyAsync(System.Func<System.Threading.Tasks.Task> testCode, string paramName) { throw null; }
49+
public static System.ArgumentException ThrowsArgumentNullOrEmptyString(System.Action testCode, string paramName) { throw null; }
50+
public static System.Threading.Tasks.Task<System.ArgumentException> ThrowsArgumentNullOrEmptyStringAsync(System.Func<System.Threading.Tasks.Task> testCode, string paramName) { throw null; }
51+
public static System.ArgumentOutOfRangeException ThrowsArgumentOutOfRange(System.Action testCode, string paramName, string exceptionMessage, object actualValue = null) { throw null; }
52+
[System.Diagnostics.DebuggerStepThroughAttribute]
53+
public static System.Threading.Tasks.Task<TException> ThrowsAsync<TException>(System.Func<System.Threading.Tasks.Task> testCode, string exceptionMessage) where TException : System.Exception { throw null; }
54+
public static TException Throws<TException>(System.Action testCode) where TException : System.Exception { throw null; }
55+
public static TException Throws<TException>(System.Action testCode, string exceptionMessage) where TException : System.Exception { throw null; }
56+
public static TException Throws<TException>(System.Func<object> testCode, string exceptionMessage) where TException : System.Exception { throw null; }
57+
}
58+
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Method)]
59+
[Xunit.Sdk.TraitDiscovererAttribute("Microsoft.AspNetCore.Testing.FlakyTestDiscoverer", "Microsoft.AspNetCore.Testing")]
60+
public sealed partial class FlakyAttribute : System.Attribute, Xunit.Sdk.ITraitAttribute
61+
{
62+
public FlakyAttribute(string gitHubIssueUrl, string firstFilter, params string[] additionalFilters) { }
63+
public System.Collections.Generic.IReadOnlyList<string> Filters { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
64+
public string GitHubIssueUrl { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
65+
}
66+
public static partial class FlakyOn
67+
{
68+
public const string All = "All";
69+
public static partial class AzP
70+
{
71+
public const string All = "AzP:All";
72+
public const string Linux = "AzP:OS:Linux";
73+
public const string macOS = "AzP:OS:Darwin";
74+
public const string Windows = "AzP:OS:Windows_NT";
75+
}
76+
public static partial class Helix
77+
{
78+
public const string All = "Helix:Queue:All";
79+
public const string Centos7Amd64 = "Helix:Queue:Centos.7.Amd64.Open";
80+
public const string Debian8Amd64 = "Helix:Queue:Debian.8.Amd64.Open";
81+
public const string Debian9Amd64 = "Helix:Queue:Debian.9.Amd64.Open";
82+
public const string Fedora27Amd64 = "Helix:Queue:Fedora.27.Amd64.Open";
83+
public const string Fedora28Amd64 = "Helix:Queue:Fedora.28.Amd64.Open";
84+
public const string macOS1012Amd64 = "Helix:Queue:OSX.1012.Amd64.Open";
85+
public const string Redhat7Amd64 = "Helix:Queue:Redhat.7.Amd64.Open";
86+
public const string Ubuntu1604Amd64 = "Helix:Queue:Ubuntu.1604.Amd64.Open";
87+
public const string Ubuntu1810Amd64 = "Helix:Queue:Ubuntu.1810.Amd64.Open";
88+
public const string Windows10Amd64 = "Helix:Queue:Windows.10.Amd64.ClientRS4.VS2017.Open";
89+
}
90+
}
91+
public partial class FlakyTestDiscoverer : Xunit.Sdk.ITraitDiscoverer
92+
{
93+
public FlakyTestDiscoverer() { }
94+
public System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, string>> GetTraits(Xunit.Abstractions.IAttributeInfo traitAttribute) { throw null; }
95+
}
96+
[System.AttributeUsageAttribute(System.AttributeTargets.Method, AllowMultiple=false)]
97+
public partial class FrameworkSkipConditionAttribute : System.Attribute, Microsoft.AspNetCore.Testing.ITestCondition
98+
{
99+
public FrameworkSkipConditionAttribute(Microsoft.AspNetCore.Testing.RuntimeFrameworks excludedFrameworks) { }
100+
public bool IsMet { get { throw null; } }
101+
public string SkipReason { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
102+
}
103+
public static partial class HelixQueues
104+
{
105+
public const string Centos7Amd64 = "Centos.7.Amd64.Open";
106+
public const string Debian8Amd64 = "Debian.8.Amd64.Open";
107+
public const string Debian9Amd64 = "Debian.9.Amd64.Open";
108+
public const string Fedora27Amd64 = "Fedora.27.Amd64.Open";
109+
public const string Fedora28Amd64 = "Fedora.28.Amd64.Open";
110+
public const string macOS1012Amd64 = "OSX.1012.Amd64.Open";
111+
public const string Redhat7Amd64 = "Redhat.7.Amd64.Open";
112+
public const string Ubuntu1604Amd64 = "Ubuntu.1604.Amd64.Open";
113+
public const string Ubuntu1810Amd64 = "Ubuntu.1810.Amd64.Open";
114+
public const string Windows10Amd64 = "Windows.10.Amd64.ClientRS4.VS2017.Open";
115+
}
116+
public static partial class HttpClientSlim
117+
{
118+
[System.Diagnostics.DebuggerStepThroughAttribute]
119+
public static System.Threading.Tasks.Task<System.Net.Sockets.Socket> GetSocket(System.Uri requestUri) { throw null; }
120+
[System.Diagnostics.DebuggerStepThroughAttribute]
121+
public static System.Threading.Tasks.Task<string> GetStringAsync(string requestUri, bool validateCertificate = true) { throw null; }
122+
[System.Diagnostics.DebuggerStepThroughAttribute]
123+
public static System.Threading.Tasks.Task<string> GetStringAsync(System.Uri requestUri, bool validateCertificate = true) { throw null; }
124+
[System.Diagnostics.DebuggerStepThroughAttribute]
125+
public static System.Threading.Tasks.Task<string> PostAsync(string requestUri, System.Net.Http.HttpContent content, bool validateCertificate = true) { throw null; }
126+
[System.Diagnostics.DebuggerStepThroughAttribute]
127+
public static System.Threading.Tasks.Task<string> PostAsync(System.Uri requestUri, System.Net.Http.HttpContent content, bool validateCertificate = true) { throw null; }
128+
}
129+
public partial interface ITestCondition
130+
{
131+
bool IsMet { get; }
132+
string SkipReason { get; }
133+
}
134+
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true)]
135+
public partial class MinimumOSVersionAttribute : System.Attribute, Microsoft.AspNetCore.Testing.ITestCondition
136+
{
137+
public MinimumOSVersionAttribute(Microsoft.AspNetCore.Testing.OperatingSystems operatingSystem, string minVersion) { }
138+
public bool IsMet { get { throw null; } }
139+
public string SkipReason { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
140+
}
141+
[System.FlagsAttribute]
142+
public enum OperatingSystems
143+
{
144+
Linux = 1,
145+
MacOSX = 2,
146+
Windows = 4,
147+
}
148+
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true)]
149+
public partial class OSSkipConditionAttribute : System.Attribute, Microsoft.AspNetCore.Testing.ITestCondition
150+
{
151+
public OSSkipConditionAttribute(Microsoft.AspNetCore.Testing.OperatingSystems operatingSystem, params string[] versions) { }
152+
public bool IsMet { get { throw null; } }
153+
public string SkipReason { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
154+
}
155+
[System.AttributeUsageAttribute(System.AttributeTargets.Method)]
156+
public partial class ReplaceCultureAttribute : Xunit.Sdk.BeforeAfterTestAttribute
157+
{
158+
public ReplaceCultureAttribute() { }
159+
public ReplaceCultureAttribute(string currentCulture, string currentUICulture) { }
160+
public System.Globalization.CultureInfo Culture { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
161+
public System.Globalization.CultureInfo UICulture { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
162+
public override void After(System.Reflection.MethodInfo methodUnderTest) { }
163+
public override void Before(System.Reflection.MethodInfo methodUnderTest) { }
164+
}
165+
[System.FlagsAttribute]
166+
public enum RuntimeFrameworks
167+
{
168+
None = 0,
169+
Mono = 1,
170+
CLR = 2,
171+
CoreCLR = 4,
172+
}
173+
[System.AttributeUsageAttribute(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false)]
174+
public partial class SkipOnCIAttribute : System.Attribute, Microsoft.AspNetCore.Testing.ITestCondition
175+
{
176+
public SkipOnCIAttribute(string issueUrl = "") { }
177+
public bool IsMet { get { throw null; } }
178+
public string IssueUrl { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
179+
public string SkipReason { get { throw null; } }
180+
public static string GetIfOnAzdo() { throw null; }
181+
public static string GetTargetHelixQueue() { throw null; }
182+
public static bool OnAzdo() { throw null; }
183+
public static bool OnCI() { throw null; }
184+
public static bool OnHelix() { throw null; }
185+
}
186+
[System.AttributeUsageAttribute(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false)]
187+
public partial class SkipOnHelixAttribute : System.Attribute, Microsoft.AspNetCore.Testing.ITestCondition
188+
{
189+
public SkipOnHelixAttribute(string issueUrl) { }
190+
public bool IsMet { get { throw null; } }
191+
public string IssueUrl { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
192+
public string Queues { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
193+
public string SkipReason { get { throw null; } }
194+
public static string GetTargetHelixQueue() { throw null; }
195+
public static bool OnHelix() { throw null; }
196+
}
197+
public partial class SkippedTestCase : Xunit.Sdk.XunitTestCase
198+
{
199+
[System.ObsoleteAttribute("Called by the de-serializer; should only be called by deriving classes for de-serialization purposes")]
200+
public SkippedTestCase() { }
201+
public SkippedTestCase(string skipReason, Xunit.Abstractions.IMessageSink diagnosticMessageSink, Xunit.Sdk.TestMethodDisplay defaultMethodDisplay, Xunit.Sdk.TestMethodDisplayOptions defaultMethodDisplayOptions, Xunit.Abstractions.ITestMethod testMethod, object[] testMethodArguments = null) { }
202+
public override void Deserialize(Xunit.Abstractions.IXunitSerializationInfo data) { }
203+
protected override string GetSkipReason(Xunit.Abstractions.IAttributeInfo factAttribute) { throw null; }
204+
public override void Serialize(Xunit.Abstractions.IXunitSerializationInfo data) { }
205+
}
206+
public static partial class TaskExtensions
207+
{
208+
[System.Diagnostics.DebuggerStepThroughAttribute]
209+
public static System.Threading.Tasks.Task TimeoutAfter(this System.Threading.Tasks.Task task, System.TimeSpan timeout, [System.Runtime.CompilerServices.CallerFilePathAttribute]string filePath = null, [System.Runtime.CompilerServices.CallerLineNumberAttribute]int lineNumber = 0) { throw null; }
210+
[System.Diagnostics.DebuggerStepThroughAttribute]
211+
public static System.Threading.Tasks.Task<T> TimeoutAfter<T>(this System.Threading.Tasks.Task<T> task, System.TimeSpan timeout, [System.Runtime.CompilerServices.CallerFilePathAttribute]string filePath = null, [System.Runtime.CompilerServices.CallerLineNumberAttribute]int lineNumber = 0) { throw null; }
212+
}
213+
public static partial class TestMethodExtensions
214+
{
215+
public static string EvaluateSkipConditions(this Xunit.Abstractions.ITestMethod testMethod) { throw null; }
216+
}
217+
[System.ObsoleteAttribute("This API is obsolete and the pattern its usage encouraged should not be used anymore. See https://github.com/aspnet/Extensions/issues/1697 for details.")]
218+
public partial class TestPathUtilities
219+
{
220+
public TestPathUtilities() { }
221+
public static string GetRepoRootDirectory() { throw null; }
222+
public static string GetSolutionRootDirectory(string solution) { throw null; }
223+
}
224+
public static partial class TestPlatformHelper
225+
{
226+
public static bool IsLinux { get { throw null; } }
227+
public static bool IsMac { get { throw null; } }
228+
public static bool IsMono { get { throw null; } }
229+
public static bool IsWindows { get { throw null; } }
230+
}
231+
public static partial class WindowsVersions
232+
{
233+
public const string Win10 = "10.0";
234+
public const string Win2008R2 = "6.1";
235+
public const string Win7 = "6.1";
236+
public const string Win8 = "6.2";
237+
public const string Win81 = "6.3";
238+
}
239+
}
240+
namespace Microsoft.AspNetCore.Testing.Tracing
241+
{
242+
public partial class CollectingEventListener : System.Diagnostics.Tracing.EventListener
243+
{
244+
public CollectingEventListener() { }
245+
public void CollectFrom(System.Diagnostics.Tracing.EventSource eventSource) { }
246+
public void CollectFrom(string eventSourceName) { }
247+
public System.Collections.Generic.IReadOnlyList<System.Diagnostics.Tracing.EventWrittenEventArgs> GetEventsWritten() { throw null; }
248+
protected override void OnEventSourceCreated(System.Diagnostics.Tracing.EventSource eventSource) { }
249+
protected override void OnEventWritten(System.Diagnostics.Tracing.EventWrittenEventArgs eventData) { }
250+
}
251+
public partial class EventAssert
252+
{
253+
public EventAssert(int expectedId, string expectedName, System.Diagnostics.Tracing.EventLevel expectedLevel) { }
254+
public static void Collection(System.Collections.Generic.IEnumerable<System.Diagnostics.Tracing.EventWrittenEventArgs> events, params Microsoft.AspNetCore.Testing.Tracing.EventAssert[] asserts) { }
255+
public static Microsoft.AspNetCore.Testing.Tracing.EventAssert Event(int id, string name, System.Diagnostics.Tracing.EventLevel level) { throw null; }
256+
public Microsoft.AspNetCore.Testing.Tracing.EventAssert Payload(string name, System.Action<object> asserter) { throw null; }
257+
public Microsoft.AspNetCore.Testing.Tracing.EventAssert Payload(string name, object expectedValue) { throw null; }
258+
}
259+
[Xunit.CollectionAttribute("Microsoft.AspNetCore.Testing.Tracing.EventSourceTestCollection")]
260+
public abstract partial class EventSourceTestBase : System.IDisposable
261+
{
262+
public const string CollectionName = "Microsoft.AspNetCore.Testing.Tracing.EventSourceTestCollection";
263+
public EventSourceTestBase() { }
264+
protected void CollectFrom(System.Diagnostics.Tracing.EventSource eventSource) { }
265+
protected void CollectFrom(string eventSourceName) { }
266+
public void Dispose() { }
267+
protected System.Collections.Generic.IReadOnlyList<System.Diagnostics.Tracing.EventWrittenEventArgs> GetEvents() { throw null; }
268+
}
269+
}

0 commit comments

Comments
 (0)