C# 클래스 MyTested.AspNetCore.Mvc.Utilities.Validators.HttpStatusCodeValidator

Validator class containing HTTP status code validation logic.
파일 보기 프로젝트 열기: ivaylokenov/MyTested.AspNetCore.Mvc

공개 메소드들

메소드 설명
ValidateHttpStatusCode ( HttpStatusCode expectedHttpStatusCode, int actualHttpStatusCode, Action failedValidationAction ) : void

Validates whether two HTTP status codes are the same.

ValidateHttpStatusCode ( dynamic result, HttpStatusCode expectedHttpStatusCode, Action failedValidationAction ) : void

Validates whether StatusCode is the same as the provided one from action result containing such property.

메소드 상세

ValidateHttpStatusCode() 공개 정적인 메소드

Validates whether two HTTP status codes are the same.
public static ValidateHttpStatusCode ( HttpStatusCode expectedHttpStatusCode, int actualHttpStatusCode, Action failedValidationAction ) : void
expectedHttpStatusCode HttpStatusCode Expected HTTP status code.
actualHttpStatusCode int Actual HTTP status code.
failedValidationAction Action Action to call in case of failed validation.
리턴 void

ValidateHttpStatusCode() 공개 정적인 메소드

Validates whether StatusCode is the same as the provided one from action result containing such property.
public static ValidateHttpStatusCode ( dynamic result, HttpStatusCode expectedHttpStatusCode, Action failedValidationAction ) : void
result dynamic Component result with StatusCode.
expectedHttpStatusCode HttpStatusCode Expected HTTP status code.
failedValidationAction Action Action to call in case of failed validation.
리턴 void