mirror of
https://github.com/Xevion/go-ha.git
synced 2025-12-06 01:15:10 -06:00
No need to add as field struct
This commit is contained in:
@@ -13,7 +13,6 @@ type MockState struct {
|
|||||||
EqualsError bool
|
EqualsError bool
|
||||||
GetReturn EntityState
|
GetReturn EntityState
|
||||||
GetError bool
|
GetError bool
|
||||||
AllEntities []EntityState
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s MockState) AfterSunrise(_ ...DurationString) bool {
|
func (s MockState) AfterSunrise(_ ...DurationString) bool {
|
||||||
@@ -35,7 +34,7 @@ func (s MockState) Get(eid string) (EntityState, error) {
|
|||||||
return s.GetReturn, nil
|
return s.GetReturn, nil
|
||||||
}
|
}
|
||||||
func (s MockState) List() ([]EntityState, error) {
|
func (s MockState) List() ([]EntityState, error) {
|
||||||
return s.AllEntities, nil
|
return []EntityState{}, nil
|
||||||
}
|
}
|
||||||
func (s MockState) Equals(eid, state string) (bool, error) {
|
func (s MockState) Equals(eid, state string) (bool, error) {
|
||||||
if s.EqualsError {
|
if s.EqualsError {
|
||||||
|
|||||||
Reference in New Issue
Block a user