public async void PublishShouldNotAlterChannelOptions() { var key = Convert.FromBase64String("dDGE8dYl8M9+uyUTIv0+ncs1hEa++HiNDu75Dyj4kmw="); var cipherParams = new CipherParams(key); var options = new ChannelOptions(cipherParams); // enable encrytion var channel = Channels.Get("test", options); var channel2 = Channels.Get("test"); await channel.PublishAsync(new Message(null, "This is a test", Guid.NewGuid().ToString())); Assert.Equal(options.ToJson(), channel2.Options.ToJson()); Assert.True(options.CipherParams.Equals(cipherParams)); }
public async Task PublishShouldNotAlterChannelOptions() { var key = Convert.FromBase64String("dDGE8dYl8M9+uyUTIv0+ncs1hEa++HiNDu75Dyj4kmw="); var cipherParams = new CipherParams(key); var options = new ChannelOptions(cipherParams); // enable encryption var client = await GetConnectedClient(); var channel = client.Channels.Get("test", options); var channel2 = client.Channels.Get("test"); channel.Publish(new Message(null, "This is a test", Guid.NewGuid().ToString())); await client.ProcessCommands(); Assert.Equal(options.ToJson(), channel2.Options.ToJson()); options.CipherParams.Equals(cipherParams).Should().BeTrue(); }