Table of Contents

Class AntiforgeryTests

Namespace
ProjectTemplate.Web.Tests
Assembly
ProjectTemplate.Web.Tests.dll

Verifies that antiforgery validation is applied globally to unsafe MVC requests.

public sealed class AntiforgeryTests
Inheritance
AntiforgeryTests
Inherited Members

Methods

UnannotatedUnsafeRequest_WithAntiforgeryToken_Succeeds()

Verifies that an unsafe request to an action without an antiforgery attribute succeeds with a valid token.

[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/AntiforgeryTests.cs", 37)]
public Task UnannotatedUnsafeRequest_WithAntiforgeryToken_Succeeds()

Returns

Task

A task that represents the asynchronous test operation.

UnannotatedUnsafeRequest_WithoutAntiforgeryToken_IsRejected()

Verifies that an unsafe request to an action without an antiforgery attribute is rejected when the token is missing.

[Fact("/home/runner/work/NetCoreApplicationTemplate/NetCoreApplicationTemplate/tests/ProjectTemplate.Web.Tests/AntiforgeryTests.cs", 18)]
public Task UnannotatedUnsafeRequest_WithoutAntiforgeryToken_IsRejected()

Returns

Task

A task that represents the asynchronous test operation.