public void CreateChildAppDomainHasParentEvidenceAndSetup()
        {
            string path = @".\MocksModules";

            CompilerHelper.CleanUpDirectory(path);

            TestableDirectoryLookupModuleEnumerator enumerator = new TestableDirectoryLookupModuleEnumerator(path);
            Evidence       parentEvidence = new Evidence();
            AppDomainSetup parentSetup    = new AppDomainSetup();

            parentSetup.ApplicationName = "Test Parent";
            AppDomain parentAppDomain = AppDomain.CreateDomain("Parent", parentEvidence, parentSetup);
            AppDomain childDomain     = enumerator.BuildChildDomain(parentAppDomain);

            Assert.AreEqual(parentEvidence.Count, childDomain.Evidence.Count);
            Assert.AreEqual("Test Parent", childDomain.SetupInformation.ApplicationName);
            Assert.AreNotEqual(AppDomain.CurrentDomain.Evidence.Count, childDomain.Evidence.Count);
            Assert.AreNotEqual(AppDomain.CurrentDomain.SetupInformation.ApplicationName, childDomain.SetupInformation.ApplicationName);
        }
        public void CreateChildAppDomainHasParentEvidenceAndSetup()
        {
            string path = @".\MocksModules";
            CompilerHelper.CleanUpDirectory(path);

            TestableDirectoryLookupModuleEnumerator enumerator = new TestableDirectoryLookupModuleEnumerator(path);
            Evidence parentEvidence = new Evidence();
            AppDomainSetup parentSetup = new AppDomainSetup();
            parentSetup.ApplicationName = "Test Parent";
            AppDomain parentAppDomain = AppDomain.CreateDomain("Parent", parentEvidence, parentSetup);
            AppDomain childDomain = enumerator.BuildChildDomain(parentAppDomain);
            Assert.AreEqual(parentEvidence.Count, childDomain.Evidence.Count);
            Assert.AreEqual("Test Parent", childDomain.SetupInformation.ApplicationName);
            Assert.AreNotEqual(AppDomain.CurrentDomain.Evidence.Count, childDomain.Evidence.Count);
            Assert.AreNotEqual(AppDomain.CurrentDomain.SetupInformation.ApplicationName, childDomain.SetupInformation.ApplicationName);
        }