コード例 #1
0
        public void TruncateXml_NoChange()
        {
            int    maximumLength = SampleXml_Large.Length;
            string result        = IcmWorkItemManagment.TruncateXml(SampleXml_Large, maximumLength, -1);

            Assert.AreEqual(SampleXml_Large, result);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
        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);
        }