public void NumericState_NotEquals_NumericState() { IComponentState state1 = new NumericSensorValue(5); IComponentState state2 = new NumericSensorValue(6); state1.Equals(state2).ShouldBeEquivalentTo(false); }
public void UnknownState_NotEquals_DifferentState() { IComponentState state1 = new UnknownComponentState(); IComponentState state2 = new NumericSensorValue(5); state1.Equals(state2).ShouldBeEquivalentTo(false); }
public void State_NotEquals_DifferentState() { IComponentState state1 = new StatefulComponentState("Off"); IComponentState state2 = new NumericSensorValue(5); state1.Equals(state2).ShouldBeEquivalentTo(false); }
public void NumericValue_Serialize() { IComponentState state = new NumericSensorValue(5); IJsonValue jsonValue = state.ToJsonValue(); jsonValue.ValueType.ShouldBeEquivalentTo(JsonValueType.Number); jsonValue.GetNumber().ShouldBeEquivalentTo(5); }