Beispiel #1
0
        public void RefineProbingPathArray()
        {
            var probingPaths = new[] { @"c:\folder\one\file.dll", @"c:\folder\two\file.dll" }.Select(Path.GetDirectoryName).ToArray();

            Assert.That(
                BizTalkAssemblyResolver.RefineProbingPaths(probingPaths),
                Is.EqualTo(new[] { @"c:\folder\one", @"c:\folder\two" }));
        }
        static BizTalkAssemblyResolver()
        {
            // [HKLM\SOFTWARE\Microsoft\BizTalk Server\3.0]
            using (var classes32 = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32))
                using (var btsKey = classes32.SafeOpenSubKey(@"SOFTWARE\Microsoft\BizTalk Server\3.0"))
                {
                    _installPath = (string)btsKey.GetValue("InstallPath");
                }

            _defaultProbingPaths = new[] {
                _installPath,
                Path.Combine(_installPath, @"Developer Tools"),
                Path.Combine(_installPath, @"SDK\Utilities\PipelineTools")
            };

            _instance = new BizTalkAssemblyResolver();
        }
Beispiel #3
0
 public void RefineProbingPath()
 {
     Assert.That(
         BizTalkAssemblyResolver.RefineProbingPaths(@"c:\folder\one"),
         Is.EqualTo(new[] { @"c:\folder\one" }));
 }
Beispiel #4
0
 public void RefineNullProbingPathArray()
 {
     Assert.That(
         BizTalkAssemblyResolver.RefineProbingPaths(new string[] { null }),
         Is.EqualTo(new string[] { }));
 }
Beispiel #5
0
 public void RefineJoinedProbingPaths()
 {
     Assert.That(
         BizTalkAssemblyResolver.RefineProbingPaths(@"c:\folder\one;c:\folder\two", @"c:\folder\six; ;;c:\folder\ten;"),
         Is.EqualTo(new[] { @"c:\folder\one", @"c:\folder\two", @"c:\folder\six", @"c:\folder\ten" }));
 }
Beispiel #6
0
 public void RefineEmptyProbingPathArray()
 {
     Assert.That(
         BizTalkAssemblyResolver.RefineProbingPaths(new[] { string.Empty }),
         Is.EqualTo(new string[] { }));
 }