1

これに似たコードを書くと、ReSharper は、テストの 1 つ (It should_...) を 2 行目にラップする必要があるまで、コード レイアウトを適切に配置します。突然、ReSharper は次のように、テストの上下に空白行を挿入します。

It should_have_the_expected_target_position = () => Focuser.CurrentStatus.TargetPositionInSteps.ShouldEqual(0);
It should_be_moving = () => Focuser.CurrentStatus.Moving.ShouldBeTrue();
It should_not_be_homing = () => Focuser.CurrentStatus.Homing.ShouldBeFalse();
It should_be_homed = () => Focuser.CurrentStatus.Homed.ShouldBeTrue();

It should_have_a_temperature_probe_attached =
    () => Focuser.CurrentStatus.TemperatureProbeDetected.ShouldBeTrue();

It should_not_have_remote_io = () => Focuser.CurrentStatus.RemoteInOutControllerDetected.ShouldBeFalse();
It should_not_have_a_hand_controller = () => Focuser.CurrentStatus.HandControllerDetected.ShouldBeFalse();

それは私の目には一種の「不潔」に見えます。空白行を削除するにはどうすればよいですか? 最終結果が次のようになることをお勧めします。

It should_have_the_expected_target_position = () => Focuser.CurrentStatus.TargetPositionInSteps.ShouldEqual(0);
It should_be_moving = () => Focuser.CurrentStatus.Moving.ShouldBeTrue();
It should_not_be_homing = () => Focuser.CurrentStatus.Homing.ShouldBeFalse();
It should_be_homed = () => Focuser.CurrentStatus.Homed.ShouldBeTrue();
It should_have_a_temperature_probe_attached =
    () => Focuser.CurrentStatus.TemperatureProbeDetected.ShouldBeTrue();
It should_not_have_remote_io = () => Focuser.CurrentStatus.RemoteInOutControllerDetected.ShouldBeFalse();
It should_not_have_a_hand_controller = () => Focuser.CurrentStatus.HandControllerDetected.ShouldBeFalse();

ReSharper 8.1 を使用しています。

4

0 に答える 0