refactor(net): own live session routing
This commit is contained in:
parent
707e606e35
commit
961bdd07b7
12 changed files with 1645 additions and 543 deletions
|
|
@ -35,6 +35,20 @@ public sealed class LiveCommandBusTests
|
|||
|
||||
Assert.Throws<InvalidOperationException>(() => bus.Register<FakeCmd>(_ => { }));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Clear_ReleasesHandlersAndMakesExistingBusInert()
|
||||
{
|
||||
var bus = new LiveCommandBus();
|
||||
int calls = 0;
|
||||
bus.Register<FakeCmd>(_ => calls++);
|
||||
bus.Publish(new FakeCmd(1));
|
||||
|
||||
bus.Clear();
|
||||
bus.Publish(new FakeCmd(2));
|
||||
|
||||
Assert.Equal(1, calls);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class ChannelResolverTests
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue