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>()); }
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>()); }
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 }