Beispiel #1
0
        public CosmosDbStatusRegistryInitializerTests()
        {
            ISearchParameterRegistry searchParameterRegistry = Substitute.For <ISearchParameterRegistry>();

            _cosmosDocumentQueryFactory = Substitute.For <ICosmosDocumentQueryFactory>();

            _initializer = new CosmosDbStatusRegistryInitializer(
                () => searchParameterRegistry,
                _cosmosDocumentQueryFactory);

            _testParameterUri = new Uri("/test", UriKind.Relative);
            searchParameterRegistry
            .GetSearchParameterStatuses()
            .Returns(new[]
            {
                new ResourceSearchParameterStatus
                {
                    Uri                  = _testParameterUri,
                    Status               = SearchParameterStatus.Enabled,
                    LastUpdated          = Clock.UtcNow,
                    IsPartiallySupported = false,
                },
            });
        }