// Copyright (C) MongoDB, Inc. 2022-present. // // Licensed under the Apache License, Version 2.0 (the "License"); you may // not use this file except in compliance with the License. You may obtain // a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 package driver import ( "testing" "go.mongodb.org/mongo-driver/internal/testutil/assert" ) func TestBatchCursor(t *testing.T) { t.Run("setBatchSize", func(t *testing.T) { var size int32 bc := &BatchCursor{ batchSize: size, } assert.Equal(t, size, bc.batchSize, "expected batchSize %v, got %v", size, bc.batchSize) size = int32(4) bc.SetBatchSize(size) assert.Equal(t, size, bc.batchSize, "expected batchSize %v, got %v", size, bc.batchSize) }) }