public void AddReadOnlyRedisQueryStorage_Services_Is_Null()
        {
            // arrange
            // act
            Action action = () =>
                            RedisQueryStorageServiceCollectionExtensions
                            .AddReadOnlyRedisQueryStorage(null, sp => _database);

            // assert
            Assert.Throws <ArgumentNullException>(action);
        }
        public void AddReadOnlyRedisQueryStorage_Factory_Is_Null()
        {
            // arrange
            var services = new ServiceCollection();

            // act
            Action action = () =>
                            RedisQueryStorageServiceCollectionExtensions
                            .AddReadOnlyRedisQueryStorage(services, null);

            // assert
            Assert.Throws <ArgumentNullException>(action);
        }
        public void AddReadOnlyRedisQueryStorage_Services()
        {
            // arrange
            var services = new ServiceCollection();

            // act
            RedisQueryStorageServiceCollectionExtensions
            .AddReadOnlyRedisQueryStorage(services, sp => _database);

            // assert
            services.ToDictionary(
                k => k.ServiceType.GetTypeName(),
                v => v.ImplementationType?.GetTypeName())
            .OrderBy(t => t.Key)
            .MatchSnapshot();
        }