github.com/altipla-consulting/ravendb-go-client@v0.1.3/tests/get_next_operation_id_command_test.go (about)

     1  package tests
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/altipla-consulting/ravendb-go-client"
     7  	"github.com/stretchr/testify/assert"
     8  )
     9  
    10  func getNextOperationIdCommandTestCanGetNextOperationId(t *testing.T, driver *RavenTestDriver) {
    11  	var err error
    12  	store := driver.getDocumentStoreMust(t)
    13  	defer store.Close()
    14  
    15  	command := ravendb.NewGetNextOperationIDCommand()
    16  	err = store.GetRequestExecutor("").ExecuteCommand(command, nil)
    17  	assert.NoError(t, err)
    18  	assert.NotNil(t, command.Result)
    19  }
    20  
    21  func TestGetNextOperationIDCommand(t *testing.T) {
    22  	driver := createTestDriver(t)
    23  	destroy := func() { destroyDriver(t, driver) }
    24  	defer recoverTest(t, destroy)
    25  
    26  	// follows execution order of java tests
    27  	getNextOperationIdCommandTestCanGetNextOperationId(t, driver)
    28  }