public void GetFileParam_ShouldThrowIfBodyIsNull() { // Given Stream bodyStream = null; // When var exception = Record.Exception(() => RestUtilities.GetFileParam(ValidFilename, bodyStream, ValidContentType)); // Then exception.Should().BeOfType <ArgumentNullException>().Subject.ParamName.Should().Be("bodyStream"); }
public void GetFileParam_ShouldThrowIfContentTypeNull() { using (var stream = new MemoryStream()) { // Given string contentType = null; // When var exception = Record.Exception(() => RestUtilities.GetFileParam(ValidFilename, stream, contentType)); // Then exception.Should().BeOfType <ArgumentNullException>().Subject.ParamName.Should().Be("contentType"); } }