Esempio n. 1
0
        public void SelectRuntimeFramework(string assemblyName, bool runAsX86)
        {
            var package = new TestPackage(Path.Combine(TestContext.CurrentContext.TestDirectory, assemblyName));

            var returnValue = _runtimeService.SelectRuntimeFramework(package);

            Assert.That(package.GetSetting("RuntimeFramework", ""), Is.EqualTo(returnValue));
            Assert.That(package.GetSetting("RunAsX86", false), Is.EqualTo(runAsX86));
        }
        public void SelectRuntimeFramework(string assemblyName, string expectedVersion, bool runAsX86)
        {
            // Some files don't actually exist on our CI servers
            Assume.That(assemblyName, Does.Exist);
            var package = new TestPackage(assemblyName);

            var returnValue = _runtimeService.SelectRuntimeFramework(package);
            var framework   = RuntimeFramework.Parse(returnValue);

            Assert.That(package.GetSetting("RuntimeFramework", ""), Is.EqualTo(returnValue));
            Assert.That(package.GetSetting("RunAsX86", false), Is.EqualTo(runAsX86));
            Assert.That(framework.ClrVersion.ToString(), Is.EqualTo(expectedVersion));
        }