chore: refactor mock apis
This commit is contained in:
parent
514211756d
commit
245730abf1
13 changed files with 109 additions and 165 deletions
|
|
@ -5,7 +5,6 @@ import (
|
|||
|
||||
"github.com/evcc-io/evcc/api"
|
||||
"github.com/evcc-io/evcc/core/loadpoint"
|
||||
"github.com/evcc-io/evcc/mock"
|
||||
"github.com/evcc-io/evcc/util"
|
||||
"github.com/golang/mock/gomock"
|
||||
)
|
||||
|
|
@ -14,12 +13,12 @@ func TestVehicleDetectByStatus(t *testing.T) {
|
|||
ctrl := gomock.NewController(t)
|
||||
|
||||
type vehicle struct {
|
||||
*mock.MockVehicle
|
||||
*mock.MockChargeState
|
||||
*api.MockVehicle
|
||||
*api.MockChargeState
|
||||
}
|
||||
|
||||
v1 := &vehicle{mock.NewMockVehicle(ctrl), mock.NewMockChargeState(ctrl)}
|
||||
v2 := &vehicle{mock.NewMockVehicle(ctrl), mock.NewMockChargeState(ctrl)}
|
||||
v1 := &vehicle{api.NewMockVehicle(ctrl), api.NewMockChargeState(ctrl)}
|
||||
v2 := &vehicle{api.NewMockVehicle(ctrl), api.NewMockChargeState(ctrl)}
|
||||
|
||||
type testcase struct {
|
||||
string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue