public void ConstructWithNullFileRepository(AP003ReceiveConfigurationEntryGenerator generator, IFileRepository fileRepository, IScenarioRouteWalker routeWalker, ILogger logger, IApplicationModel model, MigrationContext context, Exception e)
        {
            "Given an generator"
            .x(() => generator.Should().BeNull());

            "And a null file repository"
            .x(() => fileRepository.Should().BeNull());

            "And a model"
            .x(() => model = new AzureIntegrationServicesModel());

            "And a context"
            .x(() => context = TestHelper.BuildContext());

            "And a logger"
            .x(() => logger = _mockLogger.Object);

            "And a route walker"
            .x(() => routeWalker = new ScenarioRouteWalker(TestHelper.BuildContext(), _mockLogger.Object));

            "When constructing with a null file repository"
            .x(() => e = Record.Exception(() => new AP003ReceiveConfigurationEntryGenerator(fileRepository, routeWalker, model, context, logger)));

            "Then the constructor should throw an exception"
            .x(() => e.Should().NotBeNull().And.Subject.Should().BeOfType <ArgumentNullException>().Which.ParamName.Should().Be("fileRepository"));
        }
        public void ConstructWithSuccess(AP003ReceiveConfigurationEntryGenerator generator, IFileRepository fileRepository, IScenarioRouteWalker routeWalker, ILogger logger, IApplicationModel model, MigrationContext context, Exception e)
        {
            "Given an generator"
            .x(() => generator.Should().BeNull());

            "And a file repository"
            .x(() => fileRepository = _mockFileRepository.Object);

            "And a model"
            .x(() => model = new AzureIntegrationServicesModel());

            "And a context"
            .x(() => context = TestHelper.BuildContext());

            "And a logger"
            .x(() => logger = _mockLogger.Object);

            "And a route walker"
            .x(() => routeWalker = new ScenarioRouteWalker(TestHelper.BuildContext(), _mockLogger.Object));

            "When constructing"
            .x(() => e = Record.Exception(() => new AP003ReceiveConfigurationEntryGenerator(fileRepository, routeWalker, model, context, logger)));

            "Then the constructor should NOT throw an exception"
            .x(() => e.Should().BeNull());
        }
예제 #3
0
        public void ConstructWithNullLogger(ScenarioRouteWalker routeWalker, ILogger logger, MigrationContext context, Exception e)
        {
            "Given an route walker"
            .x(() => routeWalker.Should().BeNull());

            "And a null logger"
            .x(() => logger.Should().BeNull());

            "And a context"
            .x(() => context = TestHelper.BuildContext());

            "When constructing with a null logger"
            .x(() => e = Record.Exception(() => new ScenarioRouteWalker(context, logger)));

            "Then the constructor should throw an exception"
            .x(() => e.Should().NotBeNull().And.Subject.Should().BeOfType <ArgumentNullException>().Which.ParamName.Should().Be("logger"));
        }
예제 #4
0
        public void ConstructWithSuccess(ScenarioRouteWalker routeWalker, ILogger logger, MigrationContext context, Exception e)
        {
            "Given a route walker"
            .x(() => routeWalker.Should().BeNull());

            "And a context"
            .x(() => context = TestHelper.BuildContext());

            "And a logger"
            .x(() => logger = _mockLogger.Object);

            "When constructing"
            .x(() => e = Record.Exception(() => new ScenarioRouteWalker(context, logger)));

            "Then the constructor should NOT throw an exception"
            .x(() => e.Should().BeNull());
        }
예제 #5
0
 public void WalkReceiveRouteWithSuccess(ScenarioRouteWalker routeWalker, ILogger logger, MigrationContext context, Endpoint initiatingEndpoint, List <Intermediary> intermediaries, List <Channel> channels, List <Endpoint> endpoints, IList <(MessagingObject RoutingObject, Channel InputChannel)> route, Exception e)