Beispiel #1
0
        public void SavingItem_ThatIsNotVersionable_DoesntStoreVersion_LegacyAttribute()
        {
            LegacyNotVersionableItem item = new LegacyNotVersionableItem();

            item.ID = 123;

            Expect.Call(versioner.AddVersion(item)).Repeat.Never();
            versioner.Expect(v => v.IsVersionable(item)).Return(false);
            mocks.ReplayAll();

            var editor = SimulateEditor(item, ItemEditorVersioningMode.VersionAndSave);

            DoTheSaving(CreatePrincipal("someone"), editor);

            mocks.VerifyAll();
        }
		public void SavingItem_ThatIsNotVersionable_DoesntStoreVersion_LegacyAttribute()
		{
			LegacyNotVersionableItem item = new LegacyNotVersionableItem();
			item.ID = 123;

			Expect.Call(versioner.AddVersion(item)).Repeat.Never();
			versioner.Expect(v => v.IsVersionable(item)).Return(false);
			mocks.ReplayAll();

			var editor = SimulateEditor(item, ItemEditorVersioningMode.VersionAndSave);
			DoTheSaving(CreatePrincipal("someone"), editor);

			mocks.VerifyAll();
		}