Beispiel #1
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);
        }
Beispiel #2
0
        public void Change_DifferentName()
        {
            StubDetail sd1 = new StubDetail("X1", "", Visibility.Public);
            StubDetail sd2 = new StubDetail("X2", "", Visibility.Public);

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

            sd1.PerformCompare(sd2);
        }
Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #6
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);
        }
        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);
        }
Beispiel #8
0
 public static void ClassInit(TestContext ctx)
 {
     _missing = new StubDetail("", "", Visibility.Public);
     _missing.Status = Status.Missing;
 }
Beispiel #9
0
 public static void ClassInit(TestContext ctx)
 {
     _missing        = new StubDetail("", "", Visibility.Public);
     _missing.Status = Status.Missing;
 }