Skip to Content
C# and .NET Core Test-Driven Development
book

C# and .NET Core Test-Driven Development

by Ayobami Adewole
May 2018
Intermediate to advanced content levelIntermediate to advanced
300 pages
7h 35m
English
Packt Publishing
Content preview from C# and .NET Core Test-Driven Development

LINQ to mocks

Language-Integrated Query (LINQ) is a language construct introduced in .NET 4.0, which provides query capabilities in the .NET Framework. LINQ has query expressions that are written in a declarative query syntax. There are different implementations of LINQ-LINQ to XML, used for querying XML documents, LINQ to entities, which is used for ADO.NET Entity Framework operations, LINQ to objects used for querying .NET collections, files, strings, and so on.

Throughout this chapter, we have created mock objects using Lambda expressions syntax. Another exciting feature available in the Moq framework is LINQ to mocks, which allows you to set up mocks using LINQ like syntax.

LINQ to Mocks is great for simple mocks, and for stubbing out ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Design Patterns with C# and .NET Core

Hands-On Design Patterns with C# and .NET Core

Gaurav Aroraa, Jeffrey Chilberto
.NET Core in Action

.NET Core in Action

Dustin Metzgar

Publisher Resources

ISBN: 9781788292481Supplemental Content