public void TruncateXml_NoChange() { int maximumLength = SampleXml_Large.Length; string result = IcmWorkItemManagment.TruncateXml(SampleXml_Large, maximumLength, -1); Assert.AreEqual(SampleXml_Large, result); }
public void TruncateXml_RemoveHyperlink() { int maximumLength = SampleXml_Large.Length; string result = IcmWorkItemManagment.TruncateXml(SampleXml_Large, maximumLength, 70); // File output for comparison when debugging failure. //WriteStringAsFormattedXml(ExpectedXml_Large01, OutputFileNameA); //WriteStringAsFormattedXml(result, OutputFileNameB); Assert.AreEqual(ExpectedXml_Large01, result); }
public void TruncateXml_LargeInput() { int maximumLength = (int)(SampleXml_Large.Length * 0.75); string result = IcmWorkItemManagment.TruncateXml(SampleXml_Large, maximumLength, -1); // File output for comparison when debugging failure. //WriteStringAsFormattedXml(SampleXml_Large, OutputFileNameA); //WriteStringAsFormattedXml(result, OutputFileNameB); Assert.AreEqual(ExpectedXml_Large00, result); }
public void TruncateXml_DropSiblings() { int maximumLength = SampleXml_Small.Length - 45; string result = IcmWorkItemManagment.TruncateXml(SampleXml_Small, maximumLength, -1); // File output for comparison when debugging failure. //WriteStringAsFormattedXml(SampleXml_Small, OutputFileNameA); //WriteStringAsFormattedXml(result, OutputFileNameB); Assert.AreEqual(ExpectedXml_Small01, result); }