public async Task ExecuteAsync_should_throw_when_binding_is_null()
        {
            var indexName = "x_1";
            var subject   = new DropIndexOperation(_collectionNamespace, indexName, _messageEncoderSettings);

            var ex = await CatchAsync <ArgumentNullException>(() => subject.ExecuteAsync(null, CancellationToken.None));

            ex.ParamName.Should().Be("binding");
        }
        public async Task ExecuteAsync_should_not_throw_when_collection_does_not_exist()
        {
            using (var binding = CoreTestConfiguration.GetReadWriteBinding())
            {
                var indexName = "x_1";
                var subject   = new DropIndexOperation(_collectionNamespace, indexName, _messageEncoderSettings);

                await subject.ExecuteAsync(binding, CancellationToken.None); // should not throw
            }
        }
        public async Task ExecuteAsync_should_return_expected_result()
        {
            using (var binding = CoreTestConfiguration.GetReadWriteBinding())
            {
                var keys                 = new BsonDocument("x", 1);
                var requests             = new[] { new CreateIndexRequest(keys) };
                var createIndexOperation = new CreateIndexesOperation(_collectionNamespace, requests, _messageEncoderSettings);
                await createIndexOperation.ExecuteAsync(binding, CancellationToken.None);

                var indexName = "x_1";
                var subject   = new DropIndexOperation(_collectionNamespace, indexName, _messageEncoderSettings);

                var result = await subject.ExecuteAsync(binding, CancellationToken.None);

                result["ok"].ToBoolean().Should().BeTrue();
            }
        }