Release local peer subscriptions when combat sharing stops
This commit is contained in:
parent
23ef606727
commit
55dc989f85
7 changed files with 40 additions and 4 deletions
|
|
@ -42,6 +42,21 @@ public sealed class VitalSharingTests
|
|||
|
||||
private static VitalSharing Feature(PluginHarness harness) => harness.Feature<VitalSharing>();
|
||||
|
||||
[Fact]
|
||||
public void Local_peer_subscription_exists_only_while_combat_sharing_is_enabled()
|
||||
{
|
||||
using var harness = Sharing();
|
||||
var network = harness.Host.Automation.Network;
|
||||
Assert.Empty(network.Requests);
|
||||
Feature(harness).Start();
|
||||
Feature(harness).Start();
|
||||
Assert.Equal(1, network.ActiveLeases);
|
||||
Assert.Equal(PluginPeerCapabilities.ClientState | PluginPeerCapabilities.Casts, Assert.Single(network.Requests));
|
||||
Feature(harness).OnLogoff();
|
||||
Feature(harness).Dispose();
|
||||
Assert.Equal(0, network.ActiveLeases);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Subscribe_on_start_carries_the_player_id_and_tags()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue