Ejemplo n.º 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();
        }
Ejemplo n.º 3
0
 public void RefineProbingPath()
 {
     Assert.That(
         BizTalkAssemblyResolver.RefineProbingPaths(@"c:\folder\one"),
         Is.EqualTo(new[] { @"c:\folder\one" }));
 }
Ejemplo n.º 4
0
 public void RefineNullProbingPathArray()
 {
     Assert.That(
         BizTalkAssemblyResolver.RefineProbingPaths(new string[] { null }),
         Is.EqualTo(new string[] { }));
 }
Ejemplo n.º 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" }));
 }
Ejemplo n.º 6
0
 public void RefineEmptyProbingPathArray()
 {
     Assert.That(
         BizTalkAssemblyResolver.RefineProbingPaths(new[] { string.Empty }),
         Is.EqualTo(new string[] { }));
 }