public void DoesntCreateVersion_OfNonVersionableItem()
        {
            var unversionable = new UnversionableStatefulItem();
            var context = new CommandContext(definitions.GetDefinition(unversionable.GetContentType()), unversionable, Interfaces.Editing, CreatePrincipal("admin"), nullBinder, nullValidator);
            dispatcher.Execute(CreateCommand(context), context);

            dispatcher.Execute(CreateCommand(context), context);
            Assert.That(repository.database.Values.Count(v => v.VersionOf.Value == unversionable), Is.EqualTo(0), "Expected no version to be created");
        }
        public void DoesntCreateVersion_OfNonVersionableItem()
        {
            var unversionable = new UnversionableStatefulItem();
            var context = new CommandContext(definitions.GetDefinition(unversionable.GetContentType()), unversionable, Interfaces.Editing, CreatePrincipal("admin"), nullBinder, nullValidator);
            dispatcher.Execute(CreateCommand(context), context);

            dispatcher.Execute(CreateCommand(context), context);
            versions.Repository.Repository.Count().ShouldBe(0);
        }
Beispiel #3
0
        public void DoesntCreateVersion_OfNonVersionableItem()
        {
            var unversionable = new UnversionableStatefulItem();
            var context       = new CommandContext(definitions.GetDefinition(unversionable.GetContentType()), unversionable, Interfaces.Editing, CreatePrincipal("admin"), nullBinder, nullValidator);

            dispatcher.Execute(CreateCommand(context), context);

            dispatcher.Execute(CreateCommand(context), context);
            Assert.That(repository.database.Values.Count(v => v.VersionOf.Value == unversionable), Is.EqualTo(0), "Expected no version to be created");
        }
        public void DoesntCreateVersion_OfNonVersionableItem()
        {
            var unversionable = new UnversionableStatefulItem();
            var context = new CommandContext(definitions.GetDefinition(unversionable.GetContentType()), unversionable, Interfaces.Editing, CreatePrincipal("admin"), nullBinder, nullValidator);
            dispatcher.Execute(CreateCommand(context), context);

            dispatcher.Execute(CreateCommand(context), context);
            versions.Repository.Repository.Count().ShouldBe(0);
        }