public void IVCR_ReturnsSourceVersion_WhenTargetVersionIsNull()
		{
			var source = new FakeItemVersion(2, "de");

			var comparison = new ItemVersionComparisonResult(source, null, null);

			Assert.Equal(comparison.VersionNumber, source.VersionNumber);
		}
		public void IVCR_ReturnsTargetLanguage_WhenSourceVersionIsNull()
		{
			var target = new FakeItemVersion(2, "de");

			var comparison = new ItemVersionComparisonResult(null, target, null);

			Assert.Equal(comparison.Language, target.Language);
		}
		public void IVCR_ReturnsTargetVersion_WhenSourceVersionIsNull()
		{
			var target = new FakeItemVersion(2, "de");

			var comparison = new ItemVersionComparisonResult(null, target, null);

			Assert.Equal(comparison.VersionNumber, target.VersionNumber);
		}
		public void IVCR_ReturnsSourceLanguage_WhenTargetVersionIsNull()
		{
			var source = new FakeItemVersion(2, "de");

			var comparison = new ItemVersionComparisonResult(source, null, null);

			Assert.Equal(comparison.Language, source.Language);
		}
Пример #5
0
        public ItemComparisonResult(IItemData sourceItemData, IItemData targetItemData, bool isRenamed = false, bool isMoved = false, bool isTemplateChanged = false, FieldComparisonResult[] changedSharedFields = null, ItemVersionComparisonResult[] changedVersions = null)
        {
            Assert.ArgumentNotNull(sourceItemData, "sourceItem");
            Assert.ArgumentNotNull(targetItemData, "targetItem");

            SourceItemData = sourceItemData;
            TargetItemData = targetItemData;
            IsRenamed = isRenamed;
            IsMoved = isMoved;
            IsTemplateChanged = isTemplateChanged;
            ChangedSharedFields = changedSharedFields ?? new FieldComparisonResult[0];
            ChangedVersions = changedVersions ?? new ItemVersionComparisonResult[0];
        }