public void TestRelativeUri_RelativeInput(string root)
        {
            var source = new DicomFileCollectionSource();

            source.ArchiveRoot = root;

            var result = source.ApplyArchiveRootToMakeRelativePath(@"\fish\1.dcm");

            Assert.AreEqual(@"\fish\1.dcm", result);

            result = source.ApplyArchiveRootToMakeRelativePath(@"fish\1.dcm");

            Assert.AreEqual(@"fish\1.dcm", result);
        }
Пример #2
0
        [TestCase(@"./bob/", @"./bob/fish.dcm", @"./fish.dcm")]                      //if the "root" is relative then we can still express this relative to it

        public void Test_ApplyArchiveRootToMakeRelativePath(string root, string inputPath, string expectedRelativePath)
        {
            var source = new DicomFileCollectionSource {
                ArchiveRoot = root
            };

            var result = source.ApplyArchiveRootToMakeRelativePath(inputPath);

            Assert.AreEqual(expectedRelativePath, result);
        }