public async Task TestUsingTheory(OrchestratorTestParams pTestParams)
        {
            // Arrange / Given
            var orchContext = new SagaContext
            {
                Continent = pTestParams.Continent
            };
            var context = new Mock <IDurableOrchestrationContext>();

            // mock the get input
            context.Setup(m =>
                          m.GetInput <SagaContext>()).Returns(orchContext);

            //set-up mocks for activities
            context.Setup(m =>
                          m.CallActivityAsync <bool>("IsContinentSupported", It.IsAny <object>()))
            .ReturnsAsync(pTestParams.IsContinentSupported);

            // set-up mocks for activity
            context.Setup(m
                          => m.CallActivityAsync <string>("GetSupplierOrchestratorForContinent", It.IsAny <object>()))
            .ReturnsAsync(pTestParams.SupplierToBeReturnedFromContinentOrchestrator);


            // set-up mocks for suborchstrators
            context.Setup(m =>
                          m.CallSubOrchestratorAsync <decimal>("CourierAOrchestrator", It.IsAny <string>(), It.IsAny <object>()))
            .ReturnsAsync(pTestParams.ValueForCourierA);

            context.Setup(m =>
                          m.CallSubOrchestratorAsync <decimal>("CourierBOrchestrator", It.IsAny <string>(), It.IsAny <object>()))
            .ReturnsAsync(pTestParams.ValueForCourierB);

            // mock the publish activity
            // at the time of writing, there is no way of mocking CallActivityAsync so we need to use the generic version
            context.Setup(m =>
                          m.CallActivityAsync <object>("PublishCalculatedPriceActivity", It.IsAny <object>())
                          );


            // ACT / When
            var price = await SagaToTestOrchestratorWithRetry.RunOrchestrator(context.Object);

            // Assert / Then

            context.Verify(
                m => m.CallActivityAsync <bool>(
                    "IsContinentSupported",
                    It.IsAny <object>()),
                pTestParams.IsContinentSupportedCalledTimes);

            context.Verify(
                m => m.CallActivityAsync <string>(
                    "GetSupplierOrchestratorForContinent", It.IsAny <object>()),
                pTestParams.GetSupplierOrchestratorForContinentCalledTimes
                );

            context.Verify(m =>
                           m.CallSubOrchestratorAsync <decimal>("CourierAOrchestrator", It.IsAny <string>(), It.IsAny <object>()),
                           pTestParams.CourierAOrchestratorCalledTimes);

            context.Verify(m =>
                           m.CallSubOrchestratorAsync <decimal>("CourierBOrchestrator", It.IsAny <string>(), It.IsAny <object>()),
                           pTestParams.CourierBOrchestratorCalledTimes);

            context.Verify(m =>
                           m.CallActivityAsync <object>("PublishCalculatedPriceActivity", It.IsAny <object>()),
                           pTestParams.PublishCalculatedPriceActivityCalledTimes
                           );
        }
        // V1: The MS Way
        public async Task CalculatePriceForEurope()
        {
            // Arrange / Given
            var orchContext = new SagaContext
            {
                Continent = "Europe"
            };
            var context = new Mock <IDurableOrchestrationContext>();

            // mock the get input
            context.Setup(m =>
                          m.GetInput <SagaContext>()).Returns(orchContext);

            //set-up mocks for activities
            context.Setup(m =>
                          m.CallActivityWithRetryAsync <bool>("IsContinentSupportedWithRetry", It.IsAny <RetryOptions>(),
                                                              It.IsAny <object>()))
            .ReturnsAsync(true);

            // set-up mocks for activity
            context.Setup(m
                          => m.CallActivityWithRetryAsync <string>("GetSupplierOrchestratorForContinentWithRetry",
                                                                   It.IsAny <RetryOptions>(), It.IsAny <object>()))
            .ReturnsAsync("CourierB");


            // set-up mocks for suborchstrators
            context.Setup(m =>
                          m.CallSubOrchestratorWithRetryAsync <decimal>("CourierAOrchestratorWithRetry",
                                                                        It.IsAny <RetryOptions>(), It.IsAny <string>(), It.IsAny <object>()))
            .ReturnsAsync(100);

            context.Setup(m =>
                          m.CallSubOrchestratorWithRetryAsync <decimal>("CourierBOrchestratorWithRetry",
                                                                        It.IsAny <RetryOptions>(), It.IsAny <string>(), It.IsAny <object>()))
            .ReturnsAsync(120);

            // mock the publish activity
            // at the time of writing, there is no way of mocking CallActivityAsync so we need to use the generic version
            context.Setup(m =>
                          m.CallActivityWithRetryAsync <object>("PublishCalculatedPriceActivityWithRetry",
                                                                It.IsAny <RetryOptions>(), It.IsAny <object>())
                          );


            // ACT / When
            var price = await SagaToTestOrchestratorWithRetry.RunOrchestrator(context.Object);

            // Assert / Then

            context.Verify(
                m => m.CallActivityWithRetryAsync <bool>(
                    "IsContinentSupportedWithRetry", It.IsAny <RetryOptions>(),
                    It.IsAny <object>()),
                Times.Once);

            context.Verify(
                m => m.CallActivityWithRetryAsync <string>(
                    "GetSupplierOrchestratorForContinentWithRetry", It.IsAny <RetryOptions>(), It.IsAny <object>()),
                Times.Once
                );

            context.Verify(m =>
                           m.CallSubOrchestratorWithRetryAsync <decimal>("CourierAOrchestratorWithRetry",
                                                                         It.IsAny <RetryOptions>(), It.IsAny <string>(), It.IsAny <object>()),
                           Times.Never);

            context.Verify(m =>
                           m.CallSubOrchestratorWithRetryAsync <decimal>("CourierBOrchestratorWithRetry",
                                                                         It.IsAny <RetryOptions>(), It.IsAny <string>(), It.IsAny <object>()),
                           Times.Once);

            context.Verify(m =>
                           m.CallActivityWithRetryAsync <object>("PublishCalculatedPriceActivityWithRetry",
                                                                 It.IsAny <RetryOptions>(), It.IsAny <object>()),
                           Times.Once
                           );
        }