-
Notifications
You must be signed in to change notification settings - Fork 732
Fix determining caller identity for NET Native #1776
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,4 @@ | ||
<Application | ||
x:Class="UWP.Specs.App" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" /> |
This file contains hidden or 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,37 @@ | ||
using System; | ||
using Microsoft.VisualStudio.TestPlatform.TestExecutor; | ||
using Windows.ApplicationModel; | ||
using Windows.ApplicationModel.Activation; | ||
using Windows.UI.Xaml; | ||
using Windows.UI.Xaml.Controls; | ||
using Windows.UI.Xaml.Navigation; | ||
|
||
namespace UWP.Specs | ||
{ | ||
internal sealed partial class App : Application | ||
{ | ||
public App() | ||
{ | ||
InitializeComponent(); | ||
Suspending += OnSuspending; | ||
} | ||
|
||
protected override void OnLaunched(LaunchActivatedEventArgs e) | ||
{ | ||
if (Window.Current.Content is not Frame rootFrame) | ||
{ | ||
rootFrame = new Frame(); | ||
rootFrame.NavigationFailed += OnNavigationFailed; | ||
Window.Current.Content = rootFrame; | ||
} | ||
|
||
UnitTestClient.Run(e.Arguments); | ||
} | ||
|
||
private void OnNavigationFailed(object sender, NavigationFailedEventArgs e) => | ||
throw new Exception("Failed to load Page " + e.SourcePageType.FullName); | ||
|
||
private void OnSuspending(object sender, SuspendingEventArgs e) => | ||
e.SuspendingOperation.GetDeferral().Complete(); | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.23 KB
Tests/UWP.Specs/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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,25 @@ | ||
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" IgnorableNamespaces="uap mp"> | ||
<Identity Name="17e912aa-d754-4239-acf6-e6863cff80b9" Publisher="CN=FluentAssertions" Version="1.0.0.0" /> | ||
<mp:PhoneIdentity PhoneProductId="17e912aa-d754-4239-acf6-e6863cff80b9" PhonePublisherId="00000000-0000-0000-0000-000000000000" /> | ||
<Properties> | ||
<DisplayName>UWP.Specs</DisplayName> | ||
<PublisherDisplayName>FluentAssertions</PublisherDisplayName> | ||
<Logo>Assets\StoreLogo.png</Logo> | ||
</Properties> | ||
<Dependencies> | ||
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" /> | ||
</Dependencies> | ||
<Resources> | ||
<Resource Language="x-generate" /> | ||
</Resources> | ||
<Applications> | ||
<Application Id="vstest.executionengine.universal.App" Executable="$targetnametoken$.exe" EntryPoint="UWP.Specs.App"> | ||
<uap:VisualElements DisplayName="UWP.Specs" Square150x150Logo="Assets\Square150x150Logo.png" Square44x44Logo="Assets\Square44x44Logo.png" Description="UWP.Specs" BackgroundColor="transparent"> | ||
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png" /> | ||
<uap:SplashScreen Image="Assets\SplashScreen.png" /> | ||
</uap:VisualElements> | ||
</Application> | ||
</Applications> | ||
<Capabilities> | ||
</Capabilities> | ||
</Package> |
This file contains hidden or 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,17 @@ | ||
using System.Reflection; | ||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
|
||
[assembly: AssemblyTitle("UWP.Specs")] | ||
[assembly: AssemblyDescription("")] | ||
[assembly: AssemblyConfiguration("")] | ||
[assembly: AssemblyCompany("")] | ||
[assembly: AssemblyProduct("UWP.Specs")] | ||
[assembly: AssemblyCopyright("Copyright © 2022")] | ||
[assembly: AssemblyTrademark("")] | ||
[assembly: AssemblyCulture("")] | ||
[assembly: AssemblyMetadata("TargetPlatform","UAP")] | ||
|
||
[assembly: AssemblyVersion("1.0.0.0")] | ||
[assembly: AssemblyFileVersion("1.0.0.0")] | ||
[assembly: ComVisible(false)] |
This file contains hidden or 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,5 @@ | ||
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata"> | ||
<Application> | ||
<Assembly Name="*Application*" Dynamic="Required All" /> | ||
</Application> | ||
</Directives> |
This file contains hidden or 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,100 @@ | ||
<Project ToolsVersion="15.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')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform> | ||
<ProjectGuid>{08087654-2C32-4818-95E4-45362373441D}</ProjectGuid> | ||
<OutputType>AppContainerExe</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>UWP.Specs</RootNamespace> | ||
<AssemblyName>UWP.Specs</AssemblyName> | ||
<LangVersion>9.0</LangVersion> | ||
<DefaultLanguage>en-US</DefaultLanguage> | ||
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier> | ||
<TargetPlatformVersion>10.0.19041.0</TargetPlatformVersion> | ||
<TargetPlatformMinVersion>10.0.18362.0</TargetPlatformMinVersion> | ||
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> | ||
<UnitTestPlatformVersion Condition="'$(UnitTestPlatformVersion)' == ''">$(VisualStudioVersion)</UnitTestPlatformVersion> | ||
<AppxPackageSigningEnabled>false</AppxPackageSigningEnabled> | ||
<NoWarn>$(NoWarn);2008</NoWarn> | ||
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> | ||
<DebugSymbols>true</DebugSymbols> | ||
<OutputPath>bin\x64\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants> | ||
<DebugType>full</DebugType> | ||
<PlatformTarget>x64</PlatformTarget> | ||
<UseVSHostingProcess>false</UseVSHostingProcess> | ||
<ErrorReport>prompt</ErrorReport> | ||
<Prefer32Bit>true</Prefer32Bit> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> | ||
<OutputPath>bin\x64\Release\</OutputPath> | ||
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants> | ||
<Optimize>true</Optimize> | ||
<DebugType>pdbonly</DebugType> | ||
<PlatformTarget>x64</PlatformTarget> | ||
<UseVSHostingProcess>false</UseVSHostingProcess> | ||
<ErrorReport>prompt</ErrorReport> | ||
<Prefer32Bit>true</Prefer32Bit> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<RestoreProjectStyle>PackageReference</RestoreProjectStyle> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<SDKReference Include="TestPlatform.Universal, Version=$(UnitTestPlatformVersion)" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="Properties\AssemblyInfo.cs" /> | ||
<Compile Include="App.xaml.cs"> | ||
<DependentUpon>App.xaml</DependentUpon> | ||
</Compile> | ||
<Compile Include="UwpSpecs.cs" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ApplicationDefinition Include="App.xaml"> | ||
<Generator>MSBuild:Compile</Generator> | ||
<SubType>Designer</SubType> | ||
</ApplicationDefinition> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<AppxManifest Include="Package.appxmanifest"> | ||
<SubType>Designer</SubType> | ||
</AppxManifest> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Content Include="Properties\Default.rd.xml" /> | ||
<Content Include="Assets\LockScreenLogo.scale-200.png" /> | ||
<Content Include="Assets\SplashScreen.scale-200.png" /> | ||
<Content Include="Assets\Square150x150Logo.scale-200.png" /> | ||
<Content Include="Assets\Square44x44Logo.scale-200.png" /> | ||
<Content Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png" /> | ||
<Content Include="Assets\StoreLogo.png" /> | ||
<Content Include="Assets\Wide310x150Logo.scale-200.png" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\..\Src\FluentAssertions\FluentAssertions.csproj"> | ||
<HintPath>Src\FluentAssertions\bin\$(Configuration)\netstandard2.0\FluentAssertions.dll</HintPath> | ||
<Project>{34E3713D-C02F-4868-BBE7-47DAD2C7F03D}</Project> | ||
<Name>FluentAssertions</Name> | ||
</ProjectReference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform"> | ||
<Version>6.2.13</Version> | ||
</PackageReference> | ||
<PackageReference Include="MSTest.TestAdapter"> | ||
<Version>2.2.8</Version> | ||
</PackageReference> | ||
<PackageReference Include="MSTest.TestFramework"> | ||
<Version>2.2.8</Version> | ||
</PackageReference> | ||
<PackageReference Include="System.Xml.XPath.XmlDocument"> | ||
<Version>4.3.0</Version> | ||
</PackageReference> | ||
</ItemGroup> | ||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" /> | ||
</Project> |
This file contains hidden or 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,23 @@ | ||
using System; | ||
using FluentAssertions; | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
|
||
namespace UWP.Specs | ||
{ | ||
[TestClass] | ||
public class UwpSpecs | ||
{ | ||
[TestMethod] | ||
public void Determining_caller_identity_should_not_throw_for_native_programs() | ||
{ | ||
// Arrange | ||
Action someAction = () => throw new Exception(); | ||
|
||
// Act | ||
Action act = () => someAction.Should().NotThrow(); | ||
|
||
// Assert | ||
act.Should().Throw<AssertFailedException>(); | ||
} | ||
} | ||
} |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.