public void WithInMemoryLeaseContainerInitializesStoreCorrectly()
        {
            Action <DocumentServiceLeaseStoreManager,
                    CosmosContainer,
                    string,
                    string,
                    ChangeFeedLeaseOptions,
                    ChangeFeedProcessorOptions,
                    CosmosContainer> verifier = (DocumentServiceLeaseStoreManager leaseStoreManager,
                                                 CosmosContainer leaseContainer,
                                                 string leaseContainerPrefix,
                                                 string instanceName,
                                                 ChangeFeedLeaseOptions changeFeedLeaseOptions,
                                                 ChangeFeedProcessorOptions changeFeedProcessorOptions,
                                                 CosmosContainer monitoredContainer) =>
            {
                Assert.IsInstanceOfType(leaseStoreManager, typeof(DocumentServiceLeaseStoreManagerInMemory));
            };

            ChangeFeedProcessorBuilder builder = new ChangeFeedProcessorBuilder("workflowName",
                                                                                ChangeFeedProcessorBuilderTests.GetMockedContainer(),
                                                                                ChangeFeedProcessorBuilderTests.GetMockedProcessor(),
                                                                                verifier);

            builder.WithInMemoryLeaseContainer();

            builder.Build();
        }
        public void WithInstanceNameCorrectlyPassesParameters()
        {
            string myInstance = "myInstance";
            Action <DocumentServiceLeaseStoreManager,
                    CosmosContainer,
                    string,
                    string,
                    ChangeFeedLeaseOptions,
                    ChangeFeedProcessorOptions,
                    CosmosContainer> verifier = (DocumentServiceLeaseStoreManager leaseStoreManager,
                                                 CosmosContainer leaseContainer,
                                                 string leaseContainerPrefix,
                                                 string instanceName,
                                                 ChangeFeedLeaseOptions changeFeedLeaseOptions,
                                                 ChangeFeedProcessorOptions changeFeedProcessorOptions,
                                                 CosmosContainer monitoredContainer) =>
            {
                Assert.AreEqual(myInstance, instanceName);
            };

            ChangeFeedProcessorBuilder builder = new ChangeFeedProcessorBuilder("workflowName",
                                                                                ChangeFeedProcessorBuilderTests.GetMockedContainer(),
                                                                                ChangeFeedProcessorBuilderTests.GetMockedProcessor(),
                                                                                verifier);

            builder.WithInMemoryLeaseContainer();
            builder.WithInstanceName(myInstance);

            builder.Build();
        }