如何阻止ReSharper在我的某些MSpec测试周围添加空白?

时间:2013-11-13 02:06:11

标签: resharper mspec

当我编写与此类似的代码时,ReSharper很好地安排了我的代码布局,直到我的一个测试(它应该_...)需要被包装到第二行。突然,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。

0 个答案:

没有答案