예제 #1
0
 public void CanCreateNonStandardConflictType()
 {
     var conflict = new DemoConflict(new NullMergeSituation());
     conflict.Context = new ContextDescriptor("testLabel", "testPath");
     var annotationXml = XmlTestHelper.WriteConflictAnnotation(conflict);
     Conflict.RegisterContextClass(typeof (DemoConflict));
     var regurgitated = Conflict.CreateFromChorusNotesAnnotation(annotationXml);
     Assert.That(regurgitated, Is.InstanceOf<DemoConflict>());
 }
예제 #2
0
        public void CanCreateNonStandardConflictType()
        {
            var conflict = new DemoConflict(new NullMergeSituation());

            conflict.Context = new ContextDescriptor("testLabel", "testPath");
            var annotationXml = XmlTestHelper.WriteConflictAnnotation(conflict);

            Conflict.RegisterContextClass(typeof(DemoConflict));
            var regurgitated = Conflict.CreateFromChorusNotesAnnotation(annotationXml);

            Assert.That(regurgitated, Is.InstanceOf <DemoConflict>());
        }
예제 #3
0
        public void ConflictWithInvalidUtf8DetailsWorks()
        {
            var conflict = new DemoConflict(new NullMergeSituation());

            conflict.Context     = new ContextDescriptor("testLabel", "testPath");
            conflict.HtmlDetails = "Bad\uDBFFegg";             // Unmatched low surrogate
            var annotationXml = XmlTestHelper.WriteConflictAnnotation(conflict);

            Conflict.RegisterContextClass(typeof(DemoConflict));
            var regurgitated = Conflict.CreateFromChorusNotesAnnotation(annotationXml);

            Assert.That(regurgitated.HtmlDetails, Is.StringContaining("Badegg"));            // the /uDB80 should have dropped
        }