public void Lookup_SameValueWithSeveralTags_ReturnsTrue(TestType value, Guid tag)
        {
            var orSet = new OR_Set <TestType>();

            orSet = orSet.Merge(new[] { new OR_SetElement <TestType>(value, tag), new OR_SetElement <TestType>(value, Guid.NewGuid()) }.ToImmutableHashSet(), new[] { new OR_SetElement <TestType>(value, tag) }.ToImmutableHashSet());

            var lookup = orSet.Lookup(value);

            Assert.True(lookup);
        }
        public void Lookup_AddedAndRemoved_ReturnsFalse(TestType value, Guid tag)
        {
            var orSet = new OR_Set <TestType>();

            orSet = orSet.Merge(new[] { new OR_SetElement <TestType>(value, tag) }.ToImmutableHashSet(), new[] { new OR_SetElement <TestType>(value, tag) }.ToImmutableHashSet());

            var lookup = orSet.Lookup(value);

            Assert.False(lookup);
        }
        public void Lookup_AddedAndNotRemoved_ReturnsTrue(TestType value, Guid tag)
        {
            var orSet = new OR_Set <TestType>();

            orSet = orSet.Add(value, tag);

            var lookup = orSet.Lookup(value);

            Assert.True(lookup);
        }
        public void Lookup_SameValueWithSeveralTags_ReturnsTrue(TestType value, Guid tag)
        {
            var orSet = new OR_Set <TestType>();

            orSet = orSet.Add(value, tag);
            orSet = orSet.Add(value, Guid.NewGuid());
            orSet = orSet.Remove(value, tag);

            var lookup = orSet.Lookup(value);

            Assert.True(lookup);
        }
        public void Lookup_AddedAndRemoved_ReturnsFalse(TestType value, Guid tag)
        {
            var orSet = new OR_Set <TestType>();

            var element = new OR_SetElement <TestType>(value, Guid.NewGuid());

            orSet = orSet.Add(value, tag);
            orSet = orSet.Remove(value, tag);

            var lookup = orSet.Lookup(value);

            Assert.False(lookup);
        }