public void When_object_does_not_exists_object_should_not_exist()
        {
            var item = new
            {
                Id  = AutoFixture.Create <string>(),
                Str = AutoFixture.Create <string>(),
                Int = AutoFixture.Create <int>(),
                Obj = new
                {
                    Value = AutoFixture.Create <string>()
                }
            };

            var collection = new StreamCollection(_name);

            // Act
            var exists = collection.ContainsId(item.Id);

            // Assert
            exists.Should().BeFalse();
        }
        public void When_object_exists_object_should_exist()
        {
            var item = new
            {
                Id = AutoFixture.Create<string>(),
                Str = AutoFixture.Create<string>(),
                Int = AutoFixture.Create<int>(),
                Obj = new
                {
                    Value = AutoFixture.Create<string>()
                }
            };

            var collection = new StreamCollection(_name);

            // Act
            collection.Added(item.Id, JObject.FromObject(item));
            var exists = collection.ContainsId(item.Id);

            // Assert
            exists.Should().BeTrue();
        }
        public void When_object_exists_object_should_exist()
        {
            var item = new
            {
                Id  = AutoFixture.Create <string>(),
                Str = AutoFixture.Create <string>(),
                Int = AutoFixture.Create <int>(),
                Obj = new
                {
                    Value = AutoFixture.Create <string>()
                }
            };

            var collection = new StreamCollection(_name);

            // Act
            collection.Added(item.Id, JObject.FromObject(item));
            var exists = collection.ContainsId(item.Id);

            // Assert
            exists.Should().BeTrue();
        }
        public void When_object_does_not_exists_object_should_not_exist()
        {
            var item = new
            {
                Id = AutoFixture.Create<string>(),
                Str = AutoFixture.Create<string>(),
                Int = AutoFixture.Create<int>(),
                Obj = new
                {
                    Value = AutoFixture.Create<string>()
                }
            };

            var collection = new StreamCollection(_name);

            // Act
            var exists = collection.ContainsId(item.Id);

            // Assert
            exists.Should().BeFalse();
        }