public async Task InputSelectSetOptionIEnumerableShouldCallCorrectCallService() { // ARRANGE // ACT await DefaultDaemonApp .InputSelects(new string[] { "input_select.myselect" }) .SetOption("option1") .ExecuteAsync(); // ASSERT DefaultHassClientMock.VerifyCallServiceTimes("select_option", Times.Once()); DefaultHassClientMock.VerifyCallService("input_select", "select_option", ("entity_id", "input_select.myselect"), ("option", "option1")); }
public async Task InputSelectSetOptionFuncShouldCallCorrectCallService() { // ARRANGE DefaultDaemonHost.InternalState["input_select.myselect"] = new EntityState { EntityId = "input_select.myselect" }; // ACT await DefaultDaemonApp .InputSelects(n => n.EntityId == "input_select.myselect") .SetOption("option1") .ExecuteAsync(); // ASSERT DefaultHassClientMock.VerifyCallServiceTimes("select_option", Times.Once()); DefaultHassClientMock.VerifyCallService("input_select", "select_option", ("entity_id", "input_select.myselect"), ("option", "option1")); }