From 8976cf54939dcf649527b90ccd97376e815159c9 Mon Sep 17 00:00:00 2001 From: "PUBNUB\\jakub.grzesiowski" Date: Tue, 24 Sep 2024 12:23:24 +0200 Subject: [PATCH] add temp debug method for PubnubCommon values --- src/UnitTests/PubnubApi.Tests/PubnubCommon.cs | 5 +++++ src/UnitTests/PubnubApi.Tests/WhenObjectChannelMetadata.cs | 7 +++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/UnitTests/PubnubApi.Tests/PubnubCommon.cs b/src/UnitTests/PubnubApi.Tests/PubnubCommon.cs index 8a0dd8d0f..35689a6fe 100644 --- a/src/UnitTests/PubnubApi.Tests/PubnubCommon.cs +++ b/src/UnitTests/PubnubApi.Tests/PubnubCommon.cs @@ -25,5 +25,10 @@ public static class PubnubCommon static PubnubCommon() { } + + public static string TEMP_DumpInfo() + { + return $"EnvPAMServerSideRun: {EnvPAMServerSideRun}, EnvPublishKey: {EnvPublishKey}, EnvSubscribeKey: {EnvSubscribeKey}, EnvSecretKey: {EnvSecretKey}"; + } } } \ No newline at end of file diff --git a/src/UnitTests/PubnubApi.Tests/WhenObjectChannelMetadata.cs b/src/UnitTests/PubnubApi.Tests/WhenObjectChannelMetadata.cs index 8108c20c7..e807ef499 100644 --- a/src/UnitTests/PubnubApi.Tests/WhenObjectChannelMetadata.cs +++ b/src/UnitTests/PubnubApi.Tests/WhenObjectChannelMetadata.cs @@ -31,7 +31,6 @@ public static async Task Init() if (!PubnubCommon.PAMServerSideGrant) { - Assert.Fail("-----TEST FAIL ASSERT-----"); return; } @@ -244,7 +243,7 @@ public static void ThenChannelMetadataCRUDShouldReturnSuccessCodeAndInfo() if (!receivedMessage) { - Assert.IsTrue(receivedMessage, "SetChannelMetadata/DeleteChannelMetadataId Failed"); + Assert.IsTrue(receivedMessage, $"SetChannelMetadata/DeleteChannelMetadataId Failed, DUMP DATA:\n{PubnubCommon.TEMP_DumpInfo()}"); } pubnub.Destroy(); @@ -406,7 +405,7 @@ public static async Task ThenWithAsyncChannelMetadataCRUDShouldReturnSuccessCode if (!receivedMessage) { - Assert.IsTrue(receivedMessage, "SeChannelMetadata/DeleteChannelMetadata Failed"); + Assert.IsTrue(receivedMessage, $"SeChannelMetadata/DeleteChannelMetadata Failed, DUMP DATA:\n{PubnubCommon.TEMP_DumpInfo()}"); } pubnub.Destroy(); @@ -545,7 +544,7 @@ public static void ThenChannelMetadataSetDeleteShouldReturnEventInfo() pubnub.Unsubscribe().Channels(new string[] { channelMetadataId }).Execute(); pubnub.RemoveListener(eventListener); - Assert.IsTrue(receivedDeleteEvent && receivedUpdateEvent, "Channel Metadata events Failed"); + Assert.IsTrue(receivedDeleteEvent && receivedUpdateEvent, $"Channel Metadata events Failed, DUMP DATA:\n{PubnubCommon.TEMP_DumpInfo()}"); pubnub.Destroy(); pubnub.PubnubUnitTest = null;