public void Should_Throw_If_Key_Is_WhiteSpace() { // Given var settings = new NpmSetSettings(); // When var result = Record.Exception(() => settings.ForKey(" ")); // Then result.IsArgumentNullException("key"); }
public void Should_Throw_If_Settings_Are_Null() { // Given NpmSetSettings settings = null; // When var result = Record.Exception(() => settings.ForKey("foo")); // Then result.IsArgumentNullException("settings"); }
public void Should_Set_Key() { // Given var settings = new NpmSetSettings(); var key = "foo"; // When settings.ForKey(key); // Then settings.Key.ShouldBe(key); }