From 4461ffda59cc3cb302b92df3d85d37d9c98e01da Mon Sep 17 00:00:00 2001 From: guimafelipe Date: Wed, 2 Jul 2025 14:27:15 -0700 Subject: [PATCH 1/2] Changing test to correct expected error --- test/PushNotificationTests/BaseTestSuite.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/PushNotificationTests/BaseTestSuite.cpp b/test/PushNotificationTests/BaseTestSuite.cpp index 36c5694e8b..d2bee8c7bf 100644 --- a/test/PushNotificationTests/BaseTestSuite.cpp +++ b/test/PushNotificationTests/BaseTestSuite.cpp @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation and Contributors. All rights reserved. +// Copyright (c) Microsoft Corporation and Contributors. All rights reserved. // Licensed under the MIT License. See LICENSE in the project root for license information. #include "pch.h" @@ -97,7 +97,7 @@ void BaseTestSuite::ChannelRequestUsingNullRemoteId() else { auto channelOperation{ PushNotificationManager::Default().CreateChannelAsync(winrt::guid()) }; - VERIFY_ARE_EQUAL(ChannelRequestHelper(channelOperation), E_FAIL); + VERIFY_ARE_EQUAL(ChannelRequestHelper(channelOperation), HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED)); } } @@ -111,7 +111,7 @@ void BaseTestSuite::ChannelRequestUsingRemoteId() else { auto channelOperation{ PushNotificationManager::Default().CreateChannelAsync(c_azureRemoteId) }; - VERIFY_ARE_EQUAL(ChannelRequestHelper(channelOperation), E_FAIL); + VERIFY_ARE_EQUAL(ChannelRequestHelper(channelOperation), HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED)); } } @@ -135,7 +135,7 @@ void BaseTestSuite::ChannelRequestCheckExpirationTime() else { auto channelOperation{ PushNotificationManager::Default().CreateChannelAsync(c_azureRemoteId) }; - VERIFY_ARE_EQUAL(ChannelRequestHelper(channelOperation), E_FAIL); + VERIFY_ARE_EQUAL(ChannelRequestHelper(channelOperation), HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED)); } } From f9b3cbe02c3f4c994ba0f98227bc1298aad0a96a Mon Sep 17 00:00:00 2001 From: guimafelipe Date: Wed, 2 Jul 2025 14:35:52 -0700 Subject: [PATCH 2/2] Fixing the method --- dev/PushNotifications/PushNotificationManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/PushNotifications/PushNotificationManager.cpp b/dev/PushNotifications/PushNotificationManager.cpp index 4cb15e2367..93f4a14495 100644 --- a/dev/PushNotifications/PushNotificationManager.cpp +++ b/dev/PushNotifications/PushNotificationManager.cpp @@ -219,7 +219,7 @@ namespace winrt::Microsoft::Windows::PushNotifications::implementation { co_return winrt::make( nullptr, - E_FAIL, + HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED), PushNotificationChannelStatus::CompletedFailure); }