示例#1
0
        public void When_response_contains_produces_detect_if_binary_response(string contentType, bool expectsBinary)
        {
            // Arrange
            var response  = new OpenApiResponse();
            var operation = new OpenApiOperation();

            operation.Produces = new System.Collections.Generic.List <string> {
                contentType
            };
            operation.Responses.Add("200", response);

            // Act
            var isBinary = response.IsBinary(operation);

            // Assert
            Assert.Equal(expectsBinary, isBinary);
        }