Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 79 additions & 5 deletions test/PushNotificationTests/APITests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,15 @@ namespace Test::PushNotifications
VERIFY_NO_THROW(LocalBackgroundTask.Run(mockBackgroundTaskInstance));
}

TEST_METHOD(BackgroundActivation_Unpackaged)
{
RunTestUnpackaged(L"BackgroundActivationTest", testWaitTime()); // Need to launch one time to enable background activation.

auto LocalBackgroundTask = winrt::create_instance<winrt::Windows::ApplicationModel::Background::IBackgroundTask>(c_comServerId, CLSCTX_ALL);
auto mockBackgroundTaskInstance = winrt::make<MockBackgroundTaskInstance>();
VERIFY_NO_THROW(LocalBackgroundTask.Run(mockBackgroundTaskInstance));
Comment thread
danielayala94 marked this conversation as resolved.
}

TEST_METHOD(MultipleBackgroundActivation)
{
RunTest(L"BackgroundActivationTest", testWaitTime()); // Need to launch one time to enable background activation.
Expand All @@ -188,31 +197,66 @@ namespace Test::PushNotifications

}

TEST_METHOD(MultipleBackgroundActivation_Unpackaged)
{
RunTestUnpackaged(L"BackgroundActivationTest", testWaitTime()); // Need to launch one time to enable background activation.

auto LocalBackgroundTask1 = winrt::create_instance<winrt::Windows::ApplicationModel::Background::IBackgroundTask>(c_comServerId, CLSCTX_ALL);
auto mockBackgroundTaskInstance1 = winrt::make<MockBackgroundTaskInstance>();

auto LocalBackgroundTask2 = winrt::create_instance<winrt::Windows::ApplicationModel::Background::IBackgroundTask>(c_comServerId, CLSCTX_ALL);
auto mockBackgroundTaskInstance2 = winrt::make<MockBackgroundTaskInstance>();

VERIFY_NO_THROW(LocalBackgroundTask1.Run(mockBackgroundTaskInstance1));
VERIFY_NO_THROW(LocalBackgroundTask2.Run(mockBackgroundTaskInstance2));
Comment thread
danielayala94 marked this conversation as resolved.

}

TEST_METHOD(ChannelRequestUsingNullRemoteId)
{
RunTest(L"ChannelRequestUsingNullRemoteId", testWaitTime());
}

TEST_METHOD(ChannelRequestUsingNullRemoteId_Unpackaged)
{
RunTestUnpackaged(L"ChannelRequestUsingNullRemoteId", testWaitTime());
}

TEST_METHOD(ChannelRequestUsingRemoteId)
{
RunTest(L"ChannelRequestUsingRemoteId", channelTestWaitTime());
}

TEST_METHOD(MultipleChannelClose)
TEST_METHOD(ChannelRequestUsingRemoteId_Unpackaged)
{
RunTestUnpackaged(L"ChannelRequestUsingRemoteId", channelTestWaitTime());
}

TEST_METHOD(MultipleChannelClose_Unpackaged)
{
RunTest(L"MultipleChannelClose", channelTestWaitTime());
RunTestUnpackaged(L"MultipleChannelClose", channelTestWaitTime());
}

TEST_METHOD(MultipleChannelRequestUsingSameRemoteId)
{
RunTest(L"MultipleChannelRequestUsingSameRemoteId", channelTestWaitTime());
}

TEST_METHOD(MultipleChannelRequestUsingSameRemoteId_Unpackaged)
{
RunTestUnpackaged(L"MultipleChannelRequestUsingSameRemoteId", channelTestWaitTime());
}

TEST_METHOD(MultipleChannelRequestUsingMultipleRemoteId)
{
RunTest(L"MultipleChannelRequestUsingMultipleRemoteId", channelTestWaitTime());
}

TEST_METHOD(MultipleChannelRequestUsingMultipleRemoteId_Unpackaged)
{
RunTestUnpackaged(L"MultipleChannelRequestUsingMultipleRemoteId", channelTestWaitTime());
}

TEST_METHOD(ActivatorTest)
{
RunTest(L"ActivatorTest", testWaitTime());
Expand All @@ -223,37 +267,62 @@ namespace Test::PushNotifications
RunTest(L"RegisterActivatorNullDetails", testWaitTime());
}

TEST_METHOD(RegisterActivatorNullDetails_Unpackaged)
{
RunTestUnpackaged(L"RegisterActivatorNullDetails", testWaitTime());
}

TEST_METHOD(RegisterActivatorNullClsid)
{
RunTest(L"RegisterActivatorNullClsid", testWaitTime());
}

TEST_METHOD(RegisterActivatorNullClsid_Unpackaged)
{
RunTestUnpackaged(L"RegisterActivatorNullClsid", testWaitTime());
}

TEST_METHOD(UnregisterActivatorNullToken)
{
RunTest(L"UnregisterActivatorNullToken", testWaitTime());
}

TEST_METHOD(UnregisterActivatorNullToken_Unpackaged)
{
RunTestUnpackaged(L"UnregisterActivatorNullToken", testWaitTime());
}

TEST_METHOD(UnregisterActivatorNullBackgroundRegistration)
{
RunTest(L"UnregisterActivatorNullBackgroundRegistration", testWaitTime());
}

TEST_METHOD(UnregisterActivatorNullBackgroundRegistration_Unpackaged)
{
RunTestUnpackaged(L"UnregisterActivatorNullBackgroundRegistration", testWaitTime());
}

TEST_METHOD(MultipleRegisterActivatorTest)
{
RunTest(L"MultipleRegisterActivatorTest", testWaitTime());
}

TEST_METHOD(MultipleRegisterActivatorTest_Unpackaged)
{
RunTestUnpackaged(L"MultipleRegisterActivatorTest", testWaitTime());
}

TEST_METHOD(VerifyComActivatorSupported)
{
RunTest(L"VerifyComActivatorSupported", testWaitTime());
}

TEST_METHOD(VerifyComActivatorNotSupported)
TEST_METHOD(VerifyComActivatorNotSupported_Unpackaged)
{
RunTestUnpackaged(L"VerifyComActivatorNotSupported", testWaitTime());
}

TEST_METHOD(VerifyProtocolActivatorSupported)
TEST_METHOD(VerifyProtocolActivatorSupported_Unpackaged)
{
RunTestUnpackaged(L"VerifyProtocolActivatorSupported", testWaitTime());
}
Expand All @@ -268,12 +337,17 @@ namespace Test::PushNotifications
RunTest(L"VerifyComAndProtocolActivatorNotSupported", testWaitTime());
}

TEST_METHOD(VerifyComAndProtocolActivatorNotSupported_Unpackaged)
{
RunTestUnpackaged(L"VerifyComAndProtocolActivatorNotSupported", testWaitTime());
}

TEST_METHOD(VerifyNullActivatorNotSupported)
{
RunTest(L"VerifyNullActivatorNotSupported", testWaitTime());
}

TEST_METHOD(VerifyProtocolActivation)
TEST_METHOD(VerifyProtocolActivation_Unpackaged)
{
RunTestUnpackaged(L"----WindowsAppRuntimePushServer:-Payload:\"<toast></toast>\"", testWaitTime());
}
Expand Down