openbase / bco.dal

Domotic Abstraction Layer
Other
1 stars 2 forks source link

Recording a snapshot of a unit does not filter empty color states #133

Closed pLeminoq closed 5 years ago

pLeminoq commented 5 years ago

I just had a look at the SceneRemoteTest. In the test some scenes are created from snapshots recorded on locations. These snapshots contain empty color states resulting in many exceptions printed. As a workaround I implemented that the scenes are only created from snapshots of lights and power switches but the issue remains. I think the verification of the service states when recording a snapshot is not complete. The method:

Services.verifyServiceState(serviceAttribute);

is called but it only verifies enum values. Therefore, colorStates do not get verified. Why isn't the verification method that calls the validation method of the according service interface?

DivineThreepwood commented 5 years ago

As a workaround I implemented that the scenes are only created from snapshots of lights and power switches but the issue remains.

Where did you do that?

pLeminoq commented 5 years ago

Where did you do that?

I did not implement it as a general workaround but only for the scenes created in the unit test. So, in the SceneRemoteTest where the all on and all off scenes are registered.

DivineThreepwood commented 5 years ago

alright, i will remove the workaround again.