mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 14:55:16 +00:00
23 lines
406 B
Go
23 lines
406 B
Go
package slacknotifier
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
"github.com/c9s/bbgo/pkg/types"
|
|
)
|
|
|
|
func Test_objectName(t *testing.T) {
|
|
t.Run("deposit", func(t *testing.T) {
|
|
var deposit = &types.Deposit{}
|
|
assert.Equal(t, "Deposit", objectName(deposit))
|
|
})
|
|
|
|
t.Run("local type", func(t *testing.T) {
|
|
type A struct{}
|
|
var obj = &A{}
|
|
assert.Equal(t, "A", objectName(obj))
|
|
})
|
|
}
|