Exemplo n.º 1
0
        public override void GlobalSetup()
        {
            base.GlobalSetup();
            _pipeServer    = new NamedPipeServerStream(GetType().FullName + ".Test");
            _pipeGoogle    = new NamedPipeServerStream(GetType().FullName + ".Google");
            _appDomain     = Domain.Setup(GetType().FullName).Start();
            _domainInterop = _appDomain.Create <Domain>();
            _domainDirect  = new Domain();

            _pipeServer.WaitForConnection();
            _pipeGoogle.WaitForConnection();
        }
Exemplo n.º 2
0
    public void TryingToAccessBootedKernelBeforeBootThrowsException()
    {
        var appDomain = AppDomain.Create(Guid.NewGuid());

        try
        {
            appDomain.DoCallBack(new CrossAppDomainDelegate(TryingToAccessBootedKernelBeforeBootThrowsException_AppDomainCallback));
        }
        catch (Exception e)
        {
            Assert.IsType(typeof(InvalidOperationException), e.InnerException);
        }

        AppDomain.Unload(appDomain);
    }