public void assign_with_existing_id()
        {
            var sequence = Substitute.For <ISequence>();

            var generator = new IdentityKeyGenerator("foo", sequence);

            bool assigned = true;

            generator.Assign("foo/3", out assigned).ShouldBe("foo/3");

            assigned.ShouldBeFalse();
        }
        public void assign_with_existing_id()
        {
            var sequence = Substitute.For<ISequence>();

            var generator = new IdentityKeyGenerator("foo", sequence);

            bool assigned = true;

            generator.Assign("foo/3", out assigned).ShouldBe("foo/3");

            assigned.ShouldBeFalse();

        }
        public void assign_with_empty_id()
        {
            var sequence = Substitute.For <ISequence>();

            sequence.NextLong().Returns(13);

            var generator = new IdentityKeyGenerator("foo", sequence);


            bool assigned = false;

            generator.Assign(string.Empty, out assigned).ShouldBe("foo/13");

            assigned.ShouldBeTrue();
        }
        public void assign_with_empty_id()
        {
            var sequence = Substitute.For<ISequence>();
            sequence.NextLong().Returns(13);

            var generator = new IdentityKeyGenerator("foo", sequence);


            bool assigned = false;

            generator.Assign(string.Empty, out assigned).ShouldBe("foo/13");

            assigned.ShouldBeTrue();

        }