github.com/masterhung0112/hk_server/v5@v5.0.0-20220302090640-ec71aef15e1c/store/storetest/track_point_store_test.go (about) 1 package storetest 2 3 import ( 4 "testing" 5 6 "github.com/stretchr/testify/suite" 7 ) 8 9 // type TrackPointStoreTestSuite struct { 10 // suite.Suite 11 // StoreTestSuite 12 // } 13 14 func TestTrackPointStoreTestSuite(t *testing.T) { 15 StoreTestSuiteWithSqlSupplier(t, &TrackPointStoreTestSuite{}, func(t *testing.T, testSuite StoreTestBaseSuite) { 16 suite.Run(t, testSuite) 17 }) 18 } 19 20 func (s *TrackPointStoreTestSuite) TestSave() { 21 // tp1 := &model.TrackPoint{ 22 // TargetId: "111", 23 // // TargetType: "work_bike", 24 // Point: model.GeoPoint{ 25 // Lat: 123.456, 26 // Lng: 456.678, 27 // }, 28 // DeviceId: "", 29 // // DeviceType: "mobile", 30 // } 31 32 // etp1, err := s.Store().TrackPoint().Save(tp1) 33 // if s.Nil(err) && s.NotNil(etp1) { 34 // s.Len(etp1.Id, 26) 35 // s.Equal(etp1.TargetId, tp1.TargetId) 36 // // s.Equal(etp1.TargetType, tp1.TargetType) 37 // s.Equal(etp1.DeviceId, tp1.DeviceId) 38 // // s.Equal(etp1.DeviceType, tp1.DeviceType) 39 // s.NotEqual(etp1.CreateAt, 0) 40 // } 41 } 42 43 // Test Get individual track point 44 func (s *TrackPointStoreTestSuite) TestGet() { 45 }