-
Notifications
You must be signed in to change notification settings - Fork 260
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix project samples for release 3.4 (#3032)
- Loading branch information
1 parent
c08d299
commit 5d5c982
Showing
1,196 changed files
with
641 additions
and
77 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
30 changes: 30 additions & 0 deletions
30
samples/public/DemoMSTestSdk/ProjectUsingAspire/IntegrationTest1.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,30 @@ | ||
namespace Aspire.Tests1; | ||
|
||
[TestClass] | ||
public class IntegrationTest1 | ||
{ | ||
// Instructions: | ||
// 1. Add a project reference to the target AppHost project, e.g.: | ||
// | ||
// <ItemGroup> | ||
// <ProjectReference Include="../MyAspireApp.AppHost/MyAspireApp.AppHost.csproj" /> | ||
// </ItemGroup> | ||
// | ||
// 2. Uncomment the following example test and update 'Projects.MyAspireApp_AppHost' to match your AppHost project: | ||
// | ||
// [TestMethod] | ||
// public async Task GetWebResourceRootReturnsOkStatusCode() | ||
// { | ||
// // Arrange | ||
// var appHost = await DistributedApplicationTestingBuilder.CreateAsync<Projects.MyAspireApp_AppHost>(); | ||
// await using var app = await appHost.BuildAsync(); | ||
// await app.StartAsync(); | ||
|
||
// // Act | ||
// var httpClient = app.CreateHttpClient("webfrontend"); | ||
// var response = await httpClient.GetAsync("/"); | ||
|
||
// // Assert | ||
// Assert.AreEqual(HttpStatusCode.OK, response.StatusCode); | ||
// } | ||
} |
44 changes: 44 additions & 0 deletions
44
samples/public/DemoMSTestSdk/ProjectUsingAspire/ProjectUsingAspire.csproj
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,44 @@ | ||
<Project Sdk="MSTest.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<IsPackable>false</IsPackable> | ||
<!-- By default, MSTest Sdk uses MSTest runner --> | ||
<EnableAspireTesting>true</EnableAspireTesting> | ||
</PropertyGroup> | ||
|
||
</Project> | ||
|
||
<!-- | ||
Below is the equivalent project configuration when not using MSTest.Sdk | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<IsPackable>false</IsPackable> | ||
<IsTestProject>true</IsTestProject> | ||
<EnableMSTestRunner>true</EnableMSTestRunner> | ||
<OutputType>Exe</OutputType> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Aspire.Hosting.Testing" Version="$(AspireTestingVersion)" /> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(VSTestVersion)" /> | ||
<PackageReference Include="Microsoft.Testing.Extensions.CodeCoverage" Version="$(CodeCoverageVersion)" /> | ||
<PackageReference Include="Microsoft.Testing.Extensions.TrxReport" Version="$(TestingPlatformVersion)" /> | ||
<PackageReference Include="MSTest.Analyzers" Version="$(MSTestVersion)" /> | ||
<PackageReference Include="MSTest.TestAdapter" Version="$(MSTestVersion)" /> | ||
<PackageReference Include="MSTest.TestFramework" Version="$(MSTestVersion)" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Using Include="Aspire.Hosting.Testing" /> | ||
<Using Include="Microsoft.VisualStudio.TestTools.UnitTesting" /> | ||
</ItemGroup> | ||
</Project> | ||
--> |
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
File renamed without changes.
File renamed without changes.
41 changes: 41 additions & 0 deletions
41
samples/public/DemoMSTestSdk/ProjectUsingPlaywright/ProjectUsingPlaywright.csproj
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,41 @@ | ||
<Project Sdk="MSTest.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<IsPackable>false</IsPackable> | ||
<!-- By default, MSTest Sdk uses MSTest runner --> | ||
<EnablePlaywright>true</EnablePlaywright> | ||
</PropertyGroup> | ||
|
||
</Project> | ||
|
||
|
||
<!-- | ||
Below is the equivalent project configuration when not using MSTest.Sdk | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<IsPackable>false</IsPackable> | ||
<IsTestProject>true</IsTestProject> | ||
<EnableMSTestRunner>true</EnableMSTestRunner> | ||
<OutputType>Exe</OutputType> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(VSTestVersion)" /> | ||
<PackageReference Include="Microsoft.Testing.Extensions.CodeCoverage" Version="$(CodeCoverageVersion)" /> | ||
<PackageReference Include="Microsoft.Testing.Extensions.TrxReport" Version="$(TestingPlatformVersion)" /> | ||
<PackageReference Include="MSTest.TestAdapter" Version="$(MSTestVersion)" /> | ||
<PackageReference Include="MSTest.TestFramework" Version="$(MSTestVersion)" /> | ||
<PackageReference Include="Microsoft.Playwright.MSTest" Version="$(PlaywrightVersion)" /> | ||
</ItemGroup> | ||
</Project> | ||
--> |
33 changes: 33 additions & 0 deletions
33
samples/public/DemoMSTestSdk/ProjectUsingPlaywright/UnitTest1.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,33 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
using System.Text.RegularExpressions; | ||
|
||
using Microsoft.Playwright; | ||
|
||
namespace ProjectUsingPlaywright; | ||
|
||
[TestClass] | ||
public class UnitTest1 : PageTest | ||
{ | ||
[TestMethod] | ||
public async Task HomepageHasPlaywrightInTitleAndGetStartedLinkLinkingToTheIntroPage() | ||
{ | ||
await Page.GotoAsync("https://playwright.dev"); | ||
|
||
// Expect a title "to contain" a substring. | ||
await Expect(Page).ToHaveTitleAsync(new Regex("Playwright")); | ||
|
||
// create a locator | ||
ILocator getStarted = Page.Locator("text=Get Started"); | ||
|
||
// Expect an attribute "to be strictly equal" to the value. | ||
await Expect(getStarted).ToHaveAttributeAsync("href", "/docs/intro"); | ||
|
||
// Click the get started link. | ||
await getStarted.ClickAsync(); | ||
|
||
// Expects the URL to contain intro. | ||
await Expect(Page).ToHaveURLAsync(new Regex(".*intro")); | ||
} | ||
} |
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
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
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,13 @@ | ||
<Project> | ||
|
||
<PropertyGroup> | ||
<AspireTestingVersion>8.0.1</AspireTestingVersion> | ||
<CodeCoverageVersion>17.10.4</CodeCoverageVersion> | ||
<MSTestVersion>3.4.1</MSTestVersion> | ||
<MSTestAOTVersion>1.0.0-alpha.24163.4</MSTestAOTVersion> | ||
<PlaywrightVersion>1.44.0</PlaywrightVersion> | ||
<TestingPlatformVersion>1.2.1</TestingPlatformVersion> | ||
<VSTestVersion>17.10.0</VSTestVersion> | ||
</PropertyGroup> | ||
|
||
</Project> |
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,5 +1,5 @@ | ||
{ | ||
"msbuild-sdks": { | ||
"MSTest.Sdk": "3.3.1" | ||
"MSTest.Sdk": "3.4.0" | ||
} | ||
} |
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
43 changes: 43 additions & 0 deletions
43
samples/public/mstest-runner/MSTestRunnerWinUI/MSTestRunnerWinUI.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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.5.33627.172 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTest", "UnitTest\UnitTest.csproj", "{E9CD5A8E-3214-46AE-AD52-6102A3987E97}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|ARM64 = Debug|ARM64 | ||
Debug|x64 = Debug|x64 | ||
Debug|x86 = Debug|x86 | ||
Release|ARM64 = Release|ARM64 | ||
Release|x64 = Release|x64 | ||
Release|x86 = Release|x86 | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{E9CD5A8E-3214-46AE-AD52-6102A3987E97}.Debug|ARM64.ActiveCfg = Debug|ARM64 | ||
{E9CD5A8E-3214-46AE-AD52-6102A3987E97}.Debug|ARM64.Build.0 = Debug|ARM64 | ||
{E9CD5A8E-3214-46AE-AD52-6102A3987E97}.Debug|ARM64.Deploy.0 = Debug|ARM64 | ||
{E9CD5A8E-3214-46AE-AD52-6102A3987E97}.Debug|x64.ActiveCfg = Debug|x64 | ||
{E9CD5A8E-3214-46AE-AD52-6102A3987E97}.Debug|x64.Build.0 = Debug|x64 | ||
{E9CD5A8E-3214-46AE-AD52-6102A3987E97}.Debug|x64.Deploy.0 = Debug|x64 | ||
{E9CD5A8E-3214-46AE-AD52-6102A3987E97}.Debug|x86.ActiveCfg = Debug|x86 | ||
{E9CD5A8E-3214-46AE-AD52-6102A3987E97}.Debug|x86.Build.0 = Debug|x86 | ||
{E9CD5A8E-3214-46AE-AD52-6102A3987E97}.Debug|x86.Deploy.0 = Debug|x86 | ||
{E9CD5A8E-3214-46AE-AD52-6102A3987E97}.Release|ARM64.ActiveCfg = Release|ARM64 | ||
{E9CD5A8E-3214-46AE-AD52-6102A3987E97}.Release|ARM64.Build.0 = Release|ARM64 | ||
{E9CD5A8E-3214-46AE-AD52-6102A3987E97}.Release|ARM64.Deploy.0 = Release|ARM64 | ||
{E9CD5A8E-3214-46AE-AD52-6102A3987E97}.Release|x64.ActiveCfg = Release|x64 | ||
{E9CD5A8E-3214-46AE-AD52-6102A3987E97}.Release|x64.Build.0 = Release|x64 | ||
{E9CD5A8E-3214-46AE-AD52-6102A3987E97}.Release|x64.Deploy.0 = Release|x64 | ||
{E9CD5A8E-3214-46AE-AD52-6102A3987E97}.Release|x86.ActiveCfg = Release|x86 | ||
{E9CD5A8E-3214-46AE-AD52-6102A3987E97}.Release|x86.Build.0 = Release|x86 | ||
{E9CD5A8E-3214-46AE-AD52-6102A3987E97}.Release|x86.Deploy.0 = Release|x86 | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {1FBE0D4D-1701-4F9B-8010-2460A18F36C0} | ||
EndGlobalSection | ||
EndGlobal |
Oops, something went wrong.