Adam
Adam

Reputation: 4164

Unit Testing Azure Functions and .csx Files

Azure Functions abstract plenty of dependencies like queue libraries and Azure Tables. So from a Unit Test dependencies mocking perspective, there is less coding effort (and accordingly less maintenance).

Assuming we are developing locally using Visual Studio 2015

Upvotes: 7

Views: 2250

Answers (1)

David Ebbo
David Ebbo

Reputation: 43183

As it stands, it's not really possible to unit test those files. For that reason (and a number of others), we have switched to a different model when developing Functions from Visual Studio, based on .cs and more standard .NET libraries. This makes a lot of things more 'normal' in Visual Studio. See doc for details.

Update: see also Could not load file or assembly System.Net.Http, Version=4.1.1.0 in Unit Test for Azure Functions relating to unit test projects.

Upvotes: 12

Related Questions