public void GivenANonZeroExitCodeShutdownThrows() { const string ErrorMessage = "failed!"; var server = new VBCSCompilerServer(CreateCommandFactoryMock(exitCode: 1, stdErr: ErrorMessage).Object); Action a = () => server.Shutdown(); a.ShouldThrow <BuildServerException>().WithMessage( string.Format( LocalizableStrings.ShutdownCommandFailed, ErrorMessage)); }
public void GivenAZeroExitShutdownDoesNotThrow() { var server = new VBCSCompilerServer(CreateCommandFactoryMock().Object); server.Shutdown(); }