refactor(net): converge live session state reset
This commit is contained in:
parent
78a9223b65
commit
4f31a5085f
35 changed files with 1460 additions and 83 deletions
|
|
@ -4,6 +4,30 @@ namespace AcDream.Core.Tests.Social;
|
|||
|
||||
public sealed class SocialStateTests
|
||||
{
|
||||
[Fact]
|
||||
public void SquelchState_Clear_ReturnsEmptyDatabase()
|
||||
{
|
||||
var state = new SquelchState();
|
||||
state.Replace(new SquelchDatabase(
|
||||
new Dictionary<string, uint> { ["Account"] = 1u },
|
||||
new Dictionary<uint, SquelchInfo>
|
||||
{
|
||||
[2u] = new("Character", false, new HashSet<uint> { 3u }),
|
||||
},
|
||||
new SquelchInfo("Global", true, new HashSet<uint> { 4u })));
|
||||
|
||||
state.Clear();
|
||||
|
||||
SquelchDatabase snapshot = state.Snapshot();
|
||||
Assert.Empty(snapshot.Accounts);
|
||||
Assert.Empty(snapshot.Characters);
|
||||
Assert.Empty(snapshot.Global.MessageTypes);
|
||||
Assert.Equal(string.Empty, snapshot.Global.Name);
|
||||
Assert.False(snapshot.Global.AccountWide);
|
||||
state.Clear();
|
||||
Assert.Empty(state.Snapshot().Accounts);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void FriendsState_AppliesRetailIncrementalUpdateKindsByObjectId()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue