github.com/tickstep/library-go@v0.1.1/ids/ids_test.go (about)

     1  package ids
     2  
     3  import (
     4  	"fmt"
     5  	"github.com/stretchr/testify/assert"
     6  	"testing"
     7  )
     8  
     9  func TestGetUniqueId(t *testing.T) {
    10  	fmt.Println(GetUniqueId("", 0))
    11  	assert.Equal(t, 32, len(GetUniqueId("", 0)))
    12  }
    13  
    14  func TestGetUniqueIdWithAppId(t *testing.T) {
    15  	fmt.Println(GetUniqueId("cloudpan189", 0))
    16  	assert.Equal(t, 64, len(GetUniqueId("cloudpan189", 0)))
    17  }