diff --git a/usecases/cs/lpc/public_test.go b/usecases/cs/lpc/public_test.go index 8aceb046..77a5d8e1 100644 --- a/usecases/cs/lpc/public_test.go +++ b/usecases/cs/lpc/public_test.go @@ -81,21 +81,21 @@ func (s *CsLPCSuite) Test_PendingConsumptionLimits() { func (s *CsLPCSuite) Test_Failsafe() { limit, changeable, err := s.sut.FailsafeConsumptionActivePowerLimit() assert.Equal(s.T(), 0.0, limit) - assert.Equal(s.T(), false, changeable) + assert.Equal(s.T(), true, changeable) assert.Nil(s.T(), err) - err = s.sut.SetFailsafeConsumptionActivePowerLimit(10, true) + err = s.sut.SetFailsafeConsumptionActivePowerLimit(10, false) assert.Nil(s.T(), err) limit, changeable, err = s.sut.FailsafeConsumptionActivePowerLimit() assert.Equal(s.T(), 10.0, limit) - assert.Equal(s.T(), true, changeable) + assert.Equal(s.T(), false, changeable) assert.Nil(s.T(), err) // The actual tests of the functionality is located in the util package duration, changeable, err := s.sut.FailsafeDurationMinimum() assert.Equal(s.T(), time.Duration(0), duration) - assert.Equal(s.T(), false, changeable) + assert.Equal(s.T(), true, changeable) assert.Nil(s.T(), err) err = s.sut.SetFailsafeDurationMinimum(time.Duration(time.Hour*1), true) @@ -104,6 +104,9 @@ func (s *CsLPCSuite) Test_Failsafe() { err = s.sut.SetFailsafeDurationMinimum(time.Duration(time.Hour*2), true) assert.Nil(s.T(), err) + err = s.sut.SetFailsafeConsumptionActivePowerLimit(10, true) + assert.Nil(s.T(), err) + limit, changeable, err = s.sut.FailsafeConsumptionActivePowerLimit() assert.Equal(s.T(), 10.0, limit) assert.Equal(s.T(), true, changeable) diff --git a/usecases/cs/lpp/public_test.go b/usecases/cs/lpp/public_test.go index 90442644..6d911172 100644 --- a/usecases/cs/lpp/public_test.go +++ b/usecases/cs/lpp/public_test.go @@ -80,21 +80,21 @@ func (s *CsLPPSuite) Test_PendingProductionLimits() { func (s *CsLPPSuite) Test_Failsafe() { limit, changeable, err := s.sut.FailsafeProductionActivePowerLimit() assert.Equal(s.T(), 0.0, limit) - assert.Equal(s.T(), false, changeable) + assert.Equal(s.T(), true, changeable) assert.Nil(s.T(), err) - err = s.sut.SetFailsafeProductionActivePowerLimit(10, true) + err = s.sut.SetFailsafeProductionActivePowerLimit(10, false) assert.Nil(s.T(), err) limit, changeable, err = s.sut.FailsafeProductionActivePowerLimit() assert.Equal(s.T(), 10.0, limit) - assert.Equal(s.T(), true, changeable) + assert.Equal(s.T(), false, changeable) assert.Nil(s.T(), err) // The actual tests of the functionality is located in the util package duration, changeable, err := s.sut.FailsafeDurationMinimum() assert.Equal(s.T(), time.Duration(0), duration) - assert.Equal(s.T(), false, changeable) + assert.Equal(s.T(), true, changeable) assert.Nil(s.T(), err) err = s.sut.SetFailsafeDurationMinimum(time.Duration(time.Hour*1), true) @@ -103,6 +103,9 @@ func (s *CsLPPSuite) Test_Failsafe() { err = s.sut.SetFailsafeDurationMinimum(time.Duration(time.Hour*2), true) assert.Nil(s.T(), err) + err = s.sut.SetFailsafeProductionActivePowerLimit(10, true) + assert.Nil(s.T(), err) + limit, changeable, err = s.sut.FailsafeProductionActivePowerLimit() assert.Equal(s.T(), 10.0, limit) assert.Equal(s.T(), true, changeable)