public void Should_Throw_If_Source_Is_WhiteSpace() { // Given var settings = new NpmPackSettings(); // When var result = Record.Exception(() => settings.FromSource(" ")); // Then result.IsArgumentNullException("source"); }
public void Should_Throw_If_Settings_Are_Null() { // Given NpmPackSettings settings = null; // When var result = Record.Exception(() => settings.FromSource("foo")); // Then result.IsArgumentNullException("settings"); }
public void Should_Set_Source() { // Given var settings = new NpmPackSettings(); var source = "foo"; // When settings.FromSource(source); // Then settings.Source.ShouldBe(source); }