public void Add() { var TestObject = new ManyToManyIndex <int, string>(); TestObject.Add(1, "A", "B"); Assert.True(TestObject.TryGetValue(1, out var Values)); Assert.Equal(2, Values.Count()); Assert.True(TestObject.TryGetValue("A", out var ValuesInt)); Assert.Single(ValuesInt); }
public void RemoveLeftToRight() { var TestObject = new ManyToManyIndex <int, string>(); TestObject.Add(1, "A", "B"); Assert.True(TestObject.TryGetValue(1, out var Values)); Assert.Equal(2, Values.Count()); Assert.True(TestObject.TryGetValue("A", out var ValuesInt)); Assert.Single(ValuesInt); TestObject.Remove(1); Assert.False(TestObject.TryGetValue(1, out Values)); Assert.Empty(Values); Assert.False(TestObject.TryGetValue("A", out ValuesInt)); Assert.Empty(ValuesInt); Assert.False(TestObject.TryGetValue("B", out ValuesInt)); Assert.Empty(ValuesInt); }
public ManyToManyIndexTests() { TestObject = new ManyToManyIndex <int, string>(); }