Ejemplo n.º 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 => { });
     });
 }
Ejemplo n.º 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));
        }
        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));
        }