Skip to content

Commit 8976cf5

Browse files
add temp debug method for PubnubCommon values
1 parent 863b17a commit 8976cf5

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/UnitTests/PubnubApi.Tests/PubnubCommon.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,10 @@ public static class PubnubCommon
2525
static PubnubCommon()
2626
{
2727
}
28+
29+
public static string TEMP_DumpInfo()
30+
{
31+
return $"EnvPAMServerSideRun: {EnvPAMServerSideRun}, EnvPublishKey: {EnvPublishKey}, EnvSubscribeKey: {EnvSubscribeKey}, EnvSecretKey: {EnvSecretKey}";
32+
}
2833
}
2934
}

src/UnitTests/PubnubApi.Tests/WhenObjectChannelMetadata.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ public static async Task Init()
3131

3232
if (!PubnubCommon.PAMServerSideGrant)
3333
{
34-
Assert.Fail("-----TEST FAIL ASSERT-----");
3534
return;
3635
}
3736

@@ -244,7 +243,7 @@ public static void ThenChannelMetadataCRUDShouldReturnSuccessCodeAndInfo()
244243

245244
if (!receivedMessage)
246245
{
247-
Assert.IsTrue(receivedMessage, "SetChannelMetadata/DeleteChannelMetadataId Failed");
246+
Assert.IsTrue(receivedMessage, $"SetChannelMetadata/DeleteChannelMetadataId Failed, DUMP DATA:\n{PubnubCommon.TEMP_DumpInfo()}");
248247
}
249248

250249
pubnub.Destroy();
@@ -406,7 +405,7 @@ public static async Task ThenWithAsyncChannelMetadataCRUDShouldReturnSuccessCode
406405

407406
if (!receivedMessage)
408407
{
409-
Assert.IsTrue(receivedMessage, "SeChannelMetadata/DeleteChannelMetadata Failed");
408+
Assert.IsTrue(receivedMessage, $"SeChannelMetadata/DeleteChannelMetadata Failed, DUMP DATA:\n{PubnubCommon.TEMP_DumpInfo()}");
410409
}
411410

412411
pubnub.Destroy();
@@ -545,7 +544,7 @@ public static void ThenChannelMetadataSetDeleteShouldReturnEventInfo()
545544
pubnub.Unsubscribe<string>().Channels(new string[] { channelMetadataId }).Execute();
546545
pubnub.RemoveListener(eventListener);
547546

548-
Assert.IsTrue(receivedDeleteEvent && receivedUpdateEvent, "Channel Metadata events Failed");
547+
Assert.IsTrue(receivedDeleteEvent && receivedUpdateEvent, $"Channel Metadata events Failed, DUMP DATA:\n{PubnubCommon.TEMP_DumpInfo()}");
549548

550549
pubnub.Destroy();
551550
pubnub.PubnubUnitTest = null;

0 commit comments

Comments
 (0)