public void Should_Throw_If_NuGet_Executable_Was_Not_Found() { // Given var fixture = new NuGetSourcesFixture(); fixture.GivenDefaultToolDoNotExist(); // When var result = Record.Exception(() => fixture.AddSources()); // Then Assert.IsType <CakeException>(result); Assert.Equal("NuGet: Could not locate executable.", result.Message); }