コード例 #1
0
ファイル: HostingTests.cs プロジェクト: mamasha/hydra
        public void HandleNewProxy_NotMyNamespace_should_filter_proxy()
        {
            var vcall = new Mock<IVcallSubsystem>();
            var peer = new Mock<ICommPeer>();

            var hosting = new Hosting(peer.Object, vcall.Object, new HostingConfiguration {NameSpace = "Vcall.Testing"});
            hosting.HandleNewProxy(new ProxyInfo {NameSpace = "Other.Testing"});

            var counters = _countersDb.SumAll();
            Assert.That(counters.Hosting_Event_NotMyNamespace, Is.EqualTo(1));
        }
コード例 #2
0
ファイル: HostingTests.cs プロジェクト: mamasha/hydra
        public void HandleNewProxy()
        {
            var vcall = VcallSubsystem.New();
            var config = new HostingConfiguration();

            var peer = new HostingPeer(config, vcall);

            var info = new ProxyInfo
            {
                Tag = Guid.NewGuid().ToString(),
                ListeningUri = "/tests",
                NameSpace = "Vcall.Testing",
                HostName = "localhost"
            };

            var hosting = new Hosting(peer, vcall, config);
            hosting.HandleNewProxy(info);
        }