private void AssertEqualFirstControlId(CreatedDevice[] current, CreatedDevice[] last, int index)
 {
     var currentId = current[index].ControlIds[0];
     var lastId = last[index].ControlIds[0];
     currentId.Should().Be(lastId);
 }
 private static void AssertJustCreatedDevice(
     DeviceConfiguration deviceConfiguration, CreatedDevice device,
     string expectedName,
     string[] expectedSimpleActions = null, string[] expectedSlidingActions = null)
 {
     AssertDevice(deviceConfiguration, device, expectedName, new[] { expectedName }, expectedSimpleActions, expectedSlidingActions);
 }
 private void AssertDeviceIdFromLastConfiguration(CreatedDevice[] devices, int index)
 {
     devices[index].Id.Should().Be(LastConfiguration.Devices[index].Id);
 }
 private static void AssertDevice(
     DeviceConfiguration deviceConfiguration, CreatedDevice device,
     string expectedName, string[] expectedControls,
     string[] expectedSimpleActions = null, string[] expectedSlidingActions = null)
 {
     if (expectedSimpleActions == null)
         expectedSimpleActions = DefaultSimpleActions;
     if (expectedSlidingActions == null)
         expectedSlidingActions = DefaultSlidingActions;
     if (expectedControls.Length == 0)
     {
         expectedSimpleActions = new string[0];
         expectedSlidingActions = new string[0];
     }
     device.Id.Should().NotBe(Guid.Empty);
     device.Name.Should().Be(expectedName);
     device.SimpleActions.Should().BeEquivalentTo(expectedSimpleActions, nameof(device.SimpleActions));
     device.SlidingActions.Should().BeEquivalentTo(expectedSlidingActions, nameof(device.SlidingActions));
     device.ControlIds.Length.Should().Be(expectedControls.Length, nameof(device.ControlIds));
     for (var i = 0; i < expectedControls.Length; i++)
     {
         string name = deviceConfiguration.Controls.First(c => c.Id == device.ControlIds[i]).Name;
         name.Should().Be(expectedControls[i]);
     }
 }