コード例 #1
0
ファイル: ChangeCalculator.cs プロジェクト: redoz/bitdiffer
        public void Change_DifferentTypes()
        {
            ResourceDetail r1 = new ResourceDetail(null, "test", new byte[0]);
            StubDetail s1 = new StubDetail("x1", null, Visibility.Public);

            r1.PerformCompare(s1);
        }
コード例 #2
0
ファイル: ChangeCalculator.cs プロジェクト: redoz/bitdiffer
        public void Change_DifferentName()
        {
            StubDetail sd1 = new StubDetail("X1", "", Visibility.Public);
            StubDetail sd2 = new StubDetail("X2", "", Visibility.Public);

            sd1.PerformCompare(sd2);
        }
コード例 #3
0
        public void Change_DifferentName()
        {
            StubDetail sd1 = new StubDetail("X1", "", Visibility.Public);
            StubDetail sd2 = new StubDetail("X2", "", Visibility.Public);

            sd1.PerformCompare(sd2);
        }
コード例 #4
0
        public void Change_DifferentTypes()
        {
            ResourceDetail r1 = new ResourceDetail(null, "test", new byte[0]);
            StubDetail     s1 = new StubDetail("x1", null, Visibility.Public);

            r1.PerformCompare(s1);
        }
コード例 #5
0
        protected override ChangeType CompareInstance(ICanCompare previous, bool suppressBreakingChanges)
        {
            ChangeType change = base.CompareInstance(previous, suppressBreakingChanges);

            StubDetail other = (StubDetail)previous;

            change |= VisibilityUtil.GetVisibilityChange(other._visibility, _visibility, suppressBreakingChanges);

            if (_content != other._content)
            {
                change |= ChangeType.ContentChanged;
            }

            return(change);
        }
コード例 #6
0
ファイル: ListOperations.cs プロジェクト: redoz/bitdiffer
        public void List_Align_Classes_Navigate()
        {
            StubDetail d1a = new StubDetail("A1");
            StubDetail d1b = new StubDetail("A2");
            StubDetail d2 = new StubDetail("A1");
            StubDetail d3 = new StubDetail("A2");

            List<ICanAlign> list1 = new List<ICanAlign>();
            List<ICanAlign> list2 = new List<ICanAlign>();
            List<ICanAlign> list3 = new List<ICanAlign>();

            list1.Add(d1a);
            list1.Add(d1b);
            list2.Add(d2);
            list3.Add(d3);

            ListOperations.AlignListsNoParent(list1, list2, list3);

            Assert.AreEqual(d2, d1a.NavigateForward);
            Assert.AreEqual(Status.Missing, ((ICanAlign)d1b.NavigateForward).Status);
            Assert.AreEqual(d3, d1b.NavigateForward.NavigateForward);
            Assert.AreEqual(d1a, d2.NavigateBackward);
            Assert.AreEqual(Status.Missing, ((ICanAlign)d3.NavigateBackward).Status);
        }
コード例 #7
0
        public void List_Align_Classes_Navigate()
        {
            StubDetail d1a = new StubDetail("A1");
            StubDetail d1b = new StubDetail("A2");
            StubDetail d2  = new StubDetail("A1");
            StubDetail d3  = new StubDetail("A2");

            List <ICanAlign> list1 = new List <ICanAlign>();
            List <ICanAlign> list2 = new List <ICanAlign>();
            List <ICanAlign> list3 = new List <ICanAlign>();

            list1.Add(d1a);
            list1.Add(d1b);
            list2.Add(d2);
            list3.Add(d3);

            ListOperations.AlignListsNoParent(list1, list2, list3);

            Assert.AreEqual(d2, d1a.NavigateForward);
            Assert.AreEqual(Status.Missing, ((ICanAlign)d1b.NavigateForward).Status);
            Assert.AreEqual(d3, d1b.NavigateForward.NavigateForward);
            Assert.AreEqual(d1a, d2.NavigateBackward);
            Assert.AreEqual(Status.Missing, ((ICanAlign)d3.NavigateBackward).Status);
        }
コード例 #8
0
ファイル: ChangeCalculator.cs プロジェクト: redoz/bitdiffer
 public static void ClassInit(TestContext ctx)
 {
     _missing = new StubDetail("", "", Visibility.Public);
     _missing.Status = Status.Missing;
 }
コード例 #9
0
 public static void ClassInit(TestContext ctx)
 {
     _missing        = new StubDetail("", "", Visibility.Public);
     _missing.Status = Status.Missing;
 }