C# Класс MyTested.AspNetCore.Mvc.Utilities.Validators.HttpStatusCodeValidator

Validator class containing HTTP status code validation logic.
Показать файл Открыть проект

Открытые методы

Метод Описание
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