Book Image

ASP.NET Core Essentials

By : Shahed Chowdhuri
Book Image

ASP.NET Core Essentials

By: Shahed Chowdhuri

Overview of this book

<p>ASP.NET Core is the latest collection of Microsoft’s web application development technologies. When you’re trying to reach a broad spectrum of users with a robust web application, ASP.NET Core is there to help you build that application. With the ability to cater to users on desktop, tablet, or smartphone platforms, you can put together a solution that works well anywhere.</p> <p>This book is what you need to get started developing ASP.NET Core applications was quickly as possible; starting by introducing the software and how it can be used in today’s modern world of web applications and smartphone apps. Walking you through the benefits of a Web API to support both applications and mobile apps to give you a solid understanding of the tech to build upon as you see what ASP.NET Core can do for you.</p> <p>The book wraps up with practical guidelines for the use of database technologies, unit tests, security best practices, and cloud deployments for the real world.</p>
Table of Contents (15 chapters)
ASP.NET Core Essentials
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface

Writing unit tests


In addition to DI, it is also important to write unit tests to build robust software. By automating your tests, you can minimize the chances of bugs in your code and generate confidence when adding new features.

Many articles and a few books have been written on unit testing, so this section is by no means a comprehensive reference on it. Instead, its intent is to introduce you to the possibilities of automated testing in your code.

Setting up a test project

ASP.NET developers have been using various unit testing frameworks over the years. The list of testing frameworks includes nUnit, xUnit.net, and Microsoft's own MSTest. All of these products have the same basic capabilities and some advanced capabilities as well. To extend the functionality, developers can use mocking frameworks such as Moq (pronounced Mock-You or Mock).

Since the introduction of ASP.NET Core through various Beta versions, xUnit.net has been made available and is ready for use. Although MSTest was not...