Skip to content

Commit

Permalink
rename: test/Serilog.UWP -> test/Serilog.UwpTests
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Komisarchik committed Jul 4, 2017
1 parent 7a70a02 commit f1424a9
Show file tree
Hide file tree
Showing 19 changed files with 90 additions and 130 deletions.
2 changes: 1 addition & 1 deletion BuildNativeUWP.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
param(
[String] $customLogger = "C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll",
[String] $proj = "test/Serilog.UWP"
[String] $proj = "test/Serilog.UwpTests"
)

echo "build: running .NET Native toolchain for UWP test project"
Expand Down
13 changes: 0 additions & 13 deletions test/Serilog.UWP/MainPage.xaml

This file was deleted.

30 changes: 0 additions & 30 deletions test/Serilog.UWP/MainPage.xaml.cs

This file was deleted.

29 changes: 0 additions & 29 deletions test/Serilog.UWP/Properties/AssemblyInfo.cs

This file was deleted.

Binary file removed test/Serilog.UWP/Serilog.UWP_TemporaryKey.pfx
Binary file not shown.
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>

<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="603564a6-ceb5-491d-99ed-cc6edc7f949d"
Publisher="CN=User"
Version="1.0.0.0" />
<Identity Name="87ea80a0-d6f0-4b89-beeb-900b848f1b7c"
Publisher="CN=User"
Version="1.0.0.0" />

<mp:PhoneIdentity PhoneProductId="603564a6-ceb5-491d-99ed-cc6edc7f949d" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
<mp:PhoneIdentity PhoneProductId="87ea80a0-d6f0-4b89-beeb-900b848f1b7c" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>

<Properties>
<DisplayName>Serilog.UWP</DisplayName>
<DisplayName>Serilog.UwpTests</DisplayName>
<PublisherDisplayName>User</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
</Properties>
Expand All @@ -24,26 +22,24 @@
</Dependencies>

<Resources>
<Resource Language="x-generate"/>
<Resource Language="x-generate" />
</Resources>

<Applications>
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="Serilog.UWP.App">
<Application Id="vstest.executionengine.universal.App"
Executable="$targetnametoken$.exe"
EntryPoint="Serilog.UwpTests.App">
<uap:VisualElements
DisplayName="Serilog.UWP"
DisplayName="Serilog.UwpTests"
Square150x150Logo="Assets\Square150x150Logo.png"
Square44x44Logo="Assets\Square44x44Logo.png"
Description="Serilog.UWP"
Description="Serilog.UwpTests"
BackgroundColor="transparent">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png"/>
<uap:SplashScreen Image="Assets\SplashScreen.png" />
</uap:VisualElements>
</Application>
</Applications>

<Capabilities>
<Capability Name="internetClient" />
<Capability Name="internetClientServer" />
</Capabilities>
</Package>
18 changes: 18 additions & 0 deletions test/Serilog.UwpTests/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

[assembly: AssemblyTitle("Serilog.UwpTests")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Serilog.UwpTests")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyMetadata("TargetPlatform","UAP")]

// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: ComVisible(false)]
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
developers. However, you can modify these parameters to modify the behavior of the .NET Native
optimizer.
Runtime Directives are documented at https://go.microsoft.com/fwlink/?LinkID=391919
Runtime Directives are documented at http://go.microsoft.com/fwlink/?LinkID=391919
To fully enable reflection for App1.MyClass and all of its public/private members
<Type Name="App1.MyClass" Dynamic="Required All"/>
Expand All @@ -22,8 +22,6 @@
the application package. The asterisks are not wildcards.
-->
<Assembly Name="*Application*" Dynamic="Required All" />


<!-- Add your application specific runtime directives here. -->


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProjectGuid>{8E911580-847C-4757-921C-7BCF3B812465}</ProjectGuid>
<ProjectGuid>{590AE1AA-0D4D-44B5-829D-1486ABBAD7A7}</ProjectGuid>
<OutputType>AppContainerExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Serilog.UWP</RootNamespace>
<AssemblyName>Serilog.UWP</AssemblyName>
<RootNamespace>Serilog.UwpTests</RootNamespace>
<AssemblyName>Serilog.UwpTests</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.10586.0</TargetPlatformVersion>
<TargetPlatformVersion>10.0.10586.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.10586.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WindowsXamlEnableOverview>true</WindowsXamlEnableOverview>
<PackageCertificateKeyFile>Serilog.UWP_TemporaryKey.pfx</PackageCertificateKeyFile>
<PackageCertificateKeyFile>Serilog.UwpTests_TemporaryKey.pfx</PackageCertificateKeyFile>
<UnitTestPlatformVersion Condition="'$(UnitTestPlatformVersion)' == ''">$(VisualStudioVersion)</UnitTestPlatformVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
Expand Down Expand Up @@ -92,24 +92,29 @@
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Serilog\Serilog.csproj" />
<SDKReference Include="TestPlatform.Universal, Version=$(UnitTestPlatformVersion)" />
</ItemGroup>
<ItemGroup>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
</Compile>
<Compile Include="MainPage.xaml.cs">
<DependentUpon>MainPage.xaml</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="UnitTestApp.xaml.cs">
<DependentUpon>UnitTestApp.xaml</DependentUpon>
</Compile>
<Compile Include="UnitTest.cs" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="UnitTestApp.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
</ItemGroup>
<ItemGroup>
<AppxManifest Include="Package.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
<None Include="Serilog.UwpTests_TemporaryKey.pfx" />
</ItemGroup>
<ItemGroup>
<Content Include="Properties\Default.rd.xml" />
<Content Include="Properties\UnitTestApp.rd.xml" />
<Content Include="Assets\LockScreenLogo.scale-200.png" />
<Content Include="Assets\SplashScreen.scale-200.png" />
<Content Include="Assets\Square150x150Logo.scale-200.png" />
Expand All @@ -119,22 +124,21 @@
<Content Include="Assets\Wide310x150Logo.scale-200.png" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Page Include="MainPage.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<ProjectReference Include="..\..\src\Serilog\Serilog.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>5.3.3</Version>
</PackageReference>
<PackageReference Include="xunit">
<Version>2.2.0</Version>
</PackageReference>
<PackageReference Include="xunit.runner.visualstudio">
<Version>2.2.0</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<None Include="Serilog.UWP_TemporaryKey.pfx" />
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
<VisualStudioVersion>14.0</VisualStudioVersion>
Expand Down
14 changes: 14 additions & 0 deletions test/Serilog.UwpTests/UnitTest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

using System;
using Xunit;

namespace Serilog.UwpTests
{
public class UnitTest1
{
[Fact]
public void TestMethod1()
{
}
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Application
x:Class="Serilog.UWP.App"
x:Class="Serilog.UwpTests.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Serilog.UWP"
xmlns:local="using:Serilog.UwpTests"
RequestedTheme="Light">

</Application>
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;

namespace Serilog.UWP
namespace Serilog.UwpTests
{
/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
Expand All @@ -39,6 +39,14 @@ public App()
/// <param name="e">Details about the launch request and process.</param>
protected override void OnLaunched(LaunchActivatedEventArgs e)
{

#if DEBUG
if (System.Diagnostics.Debugger.IsAttached)
{
this.DebugSettings.EnableFrameRateCounter = true;
}
#endif

Frame rootFrame = Window.Current.Content as Frame;

// Do not repeat app initialization when the Window already has content,
Expand All @@ -58,19 +66,13 @@ protected override void OnLaunched(LaunchActivatedEventArgs e)
// Place the frame in the current Window
Window.Current.Content = rootFrame;
}

Microsoft.VisualStudio.TestPlatform.TestExecutor.UnitTestClient.CreateDefaultUI();

if (e.PrelaunchActivated == false)
{
if (rootFrame.Content == null)
{
// When the navigation stack isn't restored navigate to the first page,
// configuring the new page by passing required information as a navigation
// parameter
rootFrame.Navigate(typeof(MainPage), e.Arguments);
}
// Ensure the current window is active
Window.Current.Activate();
}
// Ensure the current window is active
Window.Current.Activate();

Microsoft.VisualStudio.TestPlatform.TestExecutor.UnitTestClient.Run(e.Arguments);
}

/// <summary>
Expand Down

0 comments on commit f1424a9

Please sign in to comment.