コード例 #1
0
		public void IVCR_ReturnsSourceVersion_WhenTargetVersionIsNull()
		{
			var source = new FakeItemVersion(2, "de");

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

			Assert.Equal(comparison.VersionNumber, source.VersionNumber);
		}
コード例 #2
0
		public void IVCR_ReturnsTargetLanguage_WhenSourceVersionIsNull()
		{
			var target = new FakeItemVersion(2, "de");

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

			Assert.Equal(comparison.Language, target.Language);
		}
コード例 #3
0
		public void IVCR_ReturnsTargetVersion_WhenSourceVersionIsNull()
		{
			var target = new FakeItemVersion(2, "de");

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

			Assert.Equal(comparison.VersionNumber, target.VersionNumber);
		}
コード例 #4
0
		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];
        }