Skip to content

Successfully mocking HttpResponseData, HttpRequestData, WriteAsJsonAsync

Notifications You must be signed in to change notification settings

ruchanb/example-for-unit-testing-azure-function

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Sample code on how to Unit Test the Run Azure Functions (http)

.Net 7 Azure functions (http) uses HttpRequestData and HttpResponseData. These responses uses inbuilt extensions, which cannot be mocked.

Requirements

  • .NET 7 Azure function
  • Moq Package or Similar

Usage

Check FunctionUnitTest Project for sample unit tests

About

Successfully mocking HttpResponseData, HttpRequestData, WriteAsJsonAsync

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages