public void Update_NotExistingValue_DoesNotAddToTheAddsSet(TestType value, Guid tag, long timestamp)
        {
            var ourSet = new OUR_Set <TestType>();

            ourSet = ourSet.Update(value, tag, timestamp);

            var element = new OUR_SetElement <TestType>(value, tag, timestamp);

            Assert.DoesNotContain(element, ourSet.Adds);
        }
        public void Update_UpdatesElementInAddsSet(TestType value, Guid tag, long timestamp)
        {
            var ourSet = new OUR_Set <TestType>();

            var newValue   = _builder.Build(value.Id);
            var newElement = new OUR_SetElement <TestType>(newValue, tag, timestamp + 1);

            ourSet = ourSet.Add(value, tag, timestamp);
            ourSet = ourSet.Update(newValue, tag, timestamp + 1);

            var element = new OUR_SetElement <TestType>(value, tag, timestamp);

            Assert.Contains(newElement, ourSet.Adds);
            Assert.DoesNotContain(element, ourSet.Adds);
        }
        public void Lookup_AddedRemovedAndUpdated_ReturnsTrue(TestType value, Guid tag, long timestamp)
        {
            var ourSet = new OUR_Set <TestType>();

            ourSet = ourSet.Add(value, tag, timestamp);
            ourSet = ourSet.Remove(value, tag, timestamp + 1);

            var newValue = _builder.Build(value.Id);

            ourSet = ourSet.Update(newValue, tag, timestamp + 1);

            var lookup = ourSet.Lookup(newValue);

            Assert.True(lookup);
        }