public async Task <ActionResult> PostMode([FromBody] ModeDto data) { var mode = (LightingProxy.Mode)Enum.Parse(typeof(LightingProxy.Mode), data.Mode); await LightingProxy.SetMode(data.Hostname, mode); return(new JsonResult(new { Result = "ok" })); }
public StepDto(int id, string title, bool isVoided, ModeDto mode, ResponsibleDto responsible, AutoTransferMethod autoTransferMethod, string rowVersion) { Id = id; Title = title; IsVoided = isVoided; Mode = mode; Responsible = responsible; AutoTransferMethod = autoTransferMethod; RowVersion = rowVersion; }
public void Constructor_ShouldSetProperties() { var dut = new ModeDto(3, "M", true, true, true, "AAAAAAAAABA="); Assert.AreEqual(3, dut.Id); Assert.AreEqual("M", dut.Title); Assert.IsTrue(dut.IsVoided); Assert.IsTrue(dut.InUse); Assert.IsTrue(dut.ForSupplier); Assert.AreEqual("AAAAAAAAABA=", dut.RowVersion); }