예제 #1
0
        public void CreateDefaultExtensibleHostNullAssemblyList()
        {
            // If: I create a default server extensible host with a null provider
            // Then: I should get an exception
            var cb = new Mock <ChannelBase>();

            Assert.Throws <ArgumentNullException>(() => ExtensibleServiceHost.CreateDefaultExtensibleServer(".", null));
        }
예제 #2
0
        public void CreateDefaultExtensibleHost()
        {
            // If: I create a default server extensible host
            var esh = ExtensibleServiceHost.CreateDefaultExtensibleServer(".", new string[] { });

            // Then:
            // ... The service provider should be setup
            Assert.NotNull(esh.ServiceProvider);

            // ... The underlying rpc host should be using the stdio server channel
            var jh = esh.jsonRpcHost as JsonRpcHost;

            Assert.NotNull(jh);
            Assert.IsType <StdioServerChannel>(jh.protocolChannel);
            Assert.False(jh.protocolChannel.IsConnected);
        }