コード例 #1
0
 public void CreateContainer_BadTransport_Exception()
 {
     Assert.Throws <DotNetWorkQueueException>(
         delegate
     {
         var creator = new CreateContainer <NoOpBadTransport>();
         creator.Create(QueueContexts.NotSet, x => { }, new QueueConnection(string.Empty, string.Empty), new NoOpBadTransport(), ConnectionTypes.NotSpecified, y => { });
     });
 }
コード例 #2
0
        public void CreateContainer_NoWarnings_NoOpReceiveTransport()
        {
            var creator = new CreateContainer <NoOpReceiveTransport>();
            var c       = creator.Create(QueueContexts.NotSet, x => { }, new QueueConnection(string.Empty, string.Empty), new NoOpReceiveTransport(), ConnectionTypes.Receive, y => { });

            // Assert
            Container container = c.Container;
            var       results   = Analyzer.Analyze(container);

            Assert.False(results.Any(), Environment.NewLine +
                         string.Join(Environment.NewLine,
                                     from result in results
                                     select result.Description));
        }
コード例 #3
0
        public void CreateContainer_NoWarnings_SchedulerInitTransport()
        {
            var fixture = new Fixture().Customize(new AutoNSubstituteCustomization());
            var creator = new CreateContainer <SchedulerInit>();
            var c       = creator.Create(QueueContexts.TaskScheduler, x => { }, fixture.Create <SchedulerInit>(), y => { });

            // Assert
            Container container = c.Container;
            var       results   = Analyzer.Analyze(container);

            Assert.False(results.Any(), Environment.NewLine +
                         string.Join(Environment.NewLine,
                                     from result in results
                                     select result.Description));
        }