コード例 #1
0
        public void AddRouter_Should_Succeed()
        {
            var router1 = new TestRouter <TestRoutable>();
            var builder = new HubConfigurationBuilder <TestRoutable>();

            HubConfigurationBuilderExtensions.AddRouter(builder, router1);
            builder.Routers.Should().Contain(router1);
        }
コード例 #2
0
        public void AddRouterNull_ShouldThrow_ArgumentNullException()
        {
            var builder = new HubConfigurationBuilder <TestRoutable>();

            Assert.Throws <ArgumentNullException>(() => HubConfigurationBuilderExtensions.AddRouter(builder, null));
        }