golang-im聊天
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

friend_repo_test.go 426 B

2 years ago
1234567891011121314151617181920212223
  1. package friend
  2. import (
  3. "fmt"
  4. "testing"
  5. )
  6. func Test_friendDao_Get(t *testing.T) {
  7. friend, err := FriendRepo.Get(1, 2)
  8. fmt.Printf("%+v \n %+v \n", friend, err)
  9. }
  10. func Test_friendDao_Save(t *testing.T) {
  11. fmt.Println(FriendRepo.Save(&Friend{
  12. UserId: 1,
  13. FriendId: 2,
  14. }))
  15. }
  16. func Test_friendDao_List(t *testing.T) {
  17. friends, err := FriendRepo.List(1, FriendStatusAgree)
  18. fmt.Printf("%+v \n %+v \n", friends, err)
  19. }