Skip to content

Commit

Permalink
Refactoring PushNotification unit tests (#2389)
Browse files Browse the repository at this point in the history
* Work in progress

* Push tests working individually

* Adding LRP to singleton, nits

* Update PowerNotifications.vcxproj

* Condensed packaged/unpackaged self contained tests

* Used IsSupported flag instead

* Working on it

* BaseTestSuite working

* Removed unused namespaces

* Addressing nits

* Use verify instead of throw

* rename m_registered -> m_unregisteredFully

* Ignored failing tests

* Fix build issues

* Update PushNotificationTests.vcxproj

* Update AppNotification-Test-Constants.h
  • Loading branch information
pmpurifoy authored Apr 20, 2022
1 parent f895118 commit 1b59fce
Show file tree
Hide file tree
Showing 24 changed files with 883 additions and 454 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,27 @@
<NMakeCleanCommandLine>REM TODO Clean</NMakeCleanCommandLine>

<MakeMsixOutputFilename>WindowsAppRuntime.Test.Singleton.msix</MakeMsixOutputFilename>
<TargetBasename>PushNotificationsLongRunningTask</TargetBasename>

<StartupExe>$(TargetBasename).StartupTask</StartupExe>
<StartupExeDir>$(OutDir)$(StartupExe)</StartupExeDir>
<StartupExeFile>$(StartupExeDir)\$(StartupExe).exe</StartupExeFile>

<TargetExe>$(TargetBasename)</TargetExe>
<TargetExeDir>$(OutDir)$(TargetExe)</TargetExeDir>
<TargetExeFile>$(TargetExeDir)\$(TargetExe).exe</TargetExeFile>

<TargetExeProxyStub>$(TargetBasename).ProxyStub</TargetExeProxyStub>
<TargetExeProxyStubDir>$(OutDir)$(TargetExeProxyStub)</TargetExeProxyStubDir>
<TargetExeProxyStubFile>$(TargetExeProxyStubDir)\$(TargetExeProxyStub).dll</TargetExeProxyStubFile>
</PropertyGroup>
<ItemGroup>
<ItemGroup>
<MakeMsixInputAssets Include="$(MSBuildThisFileDirectory)\Assets\*" />
<MakeMsixInputs Include="$(MSBuildThisFileDirectory)appxmanifest.xml" />
<MakeMsixInputs Include="$(OutDir)..\WindowsAppRuntime_DLL\Microsoft.Internal.FrameworkUdk.dll" />
<MakeMsixInputs Include="$(StartupExeFile)" />
<MakeMsixInputs Include="$(TargetExeFile)" />
<MakeMsixInputs Include="$(TargetExeProxyStubFile)" />
</ItemGroup>
<PropertyGroup>
<PackageCertificateKeyFile>$(RepoTestCertificatePFX)</PackageCertificateKeyFile>
Expand All @@ -107,6 +124,17 @@
<ItemGroup>
<Xml Include="appxmanifest.xml" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(RepoRoot)\dev\PushNotifications\PushNotificationsLongRunningTask.ProxyStub\PushNotificationsLongRunningTask.ProxyStub.vcxproj">
<Project>{bf3fced0-cadb-490a-93a7-4d90e1f45ab0}</Project>
</ProjectReference>
<ProjectReference Include="$(RepoRoot)\dev\PushNotifications\PushNotificationsLongRunningTask.StartupTask\PushNotificationsLongRunningTask.StartupTask.vcxproj">
<Project>{1debbff6-ee6e-4944-9de2-35b7a686af42}</Project>
</ProjectReference>
<ProjectReference Include="$(RepoRoot)\dev\PushNotifications\PushNotificationsLongRunningTask\PushNotificationsLongRunningTask.vcxproj">
<Project>{1307dd1b-bbe8-4cd0-b1a0-0db6d61eeaa0}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,52 @@
<Resource Language="en"/>
</Resources>

<Applications>
<Application Id="App"
Executable="PushNotificationsLongRunningTask.exe"
EntryPoint="Windows.FullTrustApplication">
<uap:VisualElements
DisplayName="Windows App SDK Test.PushNotificationsTask"
Square150x150Logo="Assets\Square150x150Logo.png"
Square44x44Logo="Assets\Square44x44Logo.png"
Description="Push Notifications Long Running Task"
BackgroundColor="transparent">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png"/>
<uap:SplashScreen Image="Assets\SplashScreen.png" uap5:Optional="true"/>
</uap:VisualElements>
<Extensions>
<com:Extension Category="windows.comServer">
<com:ComServer>
<com:ExeServer Executable="PushNotificationsLongRunningTask.exe" DisplayName="Push Notifications Long Running Task">
<com:Class Id="E739C755-0D09-48DF-A468-A5DF0B5422DC" DisplayName="Push Notifications Long Running Task"/>
</com:ExeServer>
</com:ComServer>
</com:Extension>
<com:Extension Category="windows.comInterface">
<com:ComInterface>
<com:ProxyStub Id="60FC21B2-B396-4D49-94F0-7555869FB93C" DisplayName="PushNotificationsLongRunningTask ProxyStub" Path="PushNotificationsLongRunningTask.ProxyStub.dll"/>
<com:Interface Id="60FC21B2-B396-4D49-94F0-7555869FB93C" ProxyStubClsid="60FC21B2-B396-4D49-94F0-7555869FB93C"/> <!-- IID_IWpnLrpPlatform -->
</com:ComInterface>
</com:Extension>
<com:Extension Category="windows.comInterface">
<com:ComInterface>
<com:ProxyStub Id="25604D55-9B17-426F-9D67-2B11B3A65598" DisplayName="PushNotificationsLongRunningTask ProxyStub" Path="PushNotificationsLongRunningTask.ProxyStub.dll"/>
<com:Interface Id="25604D55-9B17-426F-9D67-2B11B3A65598" ProxyStubClsid="25604D55-9B17-426F-9D67-2B11B3A65598"/> <!-- IID_IWpnForegroundSink -->
</com:ComInterface>
</com:Extension>
<uap5:Extension
Category="windows.startupTask"
Executable="PushNotificationsLongRunningTask.StartupTask.exe"
EntryPoint="Windows.FullTrustApplication">
<uap5:StartupTask
TaskId="PushNotificationsId"
Enabled="true"
DisplayName="Push Notifications Long Running Task" />
</uap5:Extension>
</Extensions>
</Application>
</Applications>

<Capabilities>
<rescap:Capability Name="runFullTrust" />
</Capabilities>
Expand Down
Loading

0 comments on commit 1b59fce

Please sign in to comment.