-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

C# 6 and .NET Core 1.0

Microsoft has a proprietary unit testing framework known as MS Test, which is closely integrated with Visual Studio. However, to use a unit testing framework that is compatible with .NET Core, we will use the third-party framework xUnit.net.
Add a new Class Library project named Ch05_Calculator. In the Solution Explorer window, right-click on the Class1.cs file and choose Rename. Change its name to Calculator.
Modify the code to look like this:
namespace Ch05_Calculator { public class Calculator { public double Add(double a, double b) { return a * b; } } }
Add a new Class Library project named Ch05_CalculatorUnitTests. In the Solution Explorer, right-click on References and choose Manage NuGet Packages.
In the NuGet Package Manager window, click on the Browse tab, and then search for xunit. Click on Install for the latest stable version:
In the Solution...
Change the font size
Change margin width
Change background colour