public void ThenUnencryptObjectPublishShouldReturnSuccessCodeAndInfo() { isUnencryptObjectPublished = false; Pubnub pubnub = new Pubnub("demo", "demo", "", "", false); string channel = "my/channel"; object message = new CustomClass(); messageObjectForUnencryptPublish = JsonConvert.SerializeObject(message); pubnub.publish<string>(channel, message, ReturnSuccessUnencryptObjectPublishCodeCallback); mreUnencryptObjectPub.WaitOne(310 * 1000); if (!isUnencryptObjectPublished) { Assert.IsTrue(isUnencryptObjectPublished, "Unencrypt Publish Failed"); } else { pubnub.detailedHistory<string>(channel, -1, unEncryptObjectPublishTimetoken, -1, false, CaptureUnencryptObjectDetailedHistoryCallback); mreUnencryptObjectDH.WaitOne(310 * 1000); Assert.IsTrue(isUnencryptObjectDH, "Unable to match the successful unencrypt object Publish"); } }
public void ThenUnencryptObjectPublishShouldReturnSuccessCodeAndInfo() { isUnencryptObjectPublished = false; Pubnub pubnub = new Pubnub("demo", "demo", "", "", false); string channel = "my/channel"; object message = new CustomClass(); messageObjectForUnencryptPublish = JsonConvert.SerializeObject(message); pubnub.publish <string>(channel, message, ReturnSuccessUnencryptObjectPublishCodeCallback); mreUnencryptObjectPub.WaitOne(310 * 1000); if (!isUnencryptObjectPublished) { Assert.IsTrue(isUnencryptObjectPublished, "Unencrypt Publish Failed"); } else { pubnub.detailedHistory <string>(channel, -1, unEncryptObjectPublishTimetoken, -1, false, CaptureUnencryptObjectDetailedHistoryCallback); mreUnencryptObjectDH.WaitOne(310 * 1000); Assert.IsTrue(isUnencryptObjectDH, "Unable to match the successful unencrypt object Publish"); } }