SlideShare a Scribd company logo
1 of 23
Unit testing with –xUnit+C#
+ VSCode
Hi All, In this my first article, I will explain getting started with xUnit open source testing framework and
.NET Core using open source code editor VSCode ,showing you how you can create and run your first
set of unit tests.
Hi All, In this my first article, I will explain getting started with xUnit open source
testing framework and .NET Core using open source code editor VSCode ,showing
you how you can create and run your first set of unit tests.
1. Download the .NET SDK
2. Download the Visual Studio Code
3. Add C# extension
4. Create the unit test project
5. Add xUnit testing framework package
6. Create first test
7. Create first Parametrized tests
8. Execute tests with Visual Studio Code using xUnit testing framework
Download and install the .NET SDK
• Go to https://dotnet.microsoft.com/download/dotnet-core/2.2
• Download the SDK based on your machine configuration. Here I am using x64 and window7.
1. Download and install the .NET SDK
2. Download and install the VSCode using following
link https://code.visualstudio.com/
3. Add the C#
extension
• Open the VSCode editor,
• Click Ctrl + Shift + X to open the Extension
search box to add the C# omni extension,
Search C# for visual and install it.
4.Create the unit test
project
• Now type Ctrl+Shift+E to open the Project
explorer
• Now Click “Add Folder” and
create one folder
XUnitTestProject. Click the
“Add” to add this folder into the
workspace.
• Now the project is added in our workspace.
• Right click on the project XUnitTestProject add
new folder “src” then add another folder obj-
>objects inside it.
• Right click on Objects folder and
select the new file, add name
Class1.cs.
• Add following code in the class.
• In this class, two methods are to
return the sum of two numbers
and another method to check the
prime number.
• Now go to terminal and type following
command to build the project and it will
generate the project related files.
• Type “dotnet build” in the termial.
5. Add xUnit testing
framework package • Type Ctrl+Shift+P to open the NuGet Package
Manager: Add Package
• Now double click the NuGet Package Manager.
• Now type the “xUnit” and hit enter. Select xunit
,hit enter again and choose the 2.4.1 version
• Now the xunit will be added in the project config file
• In similer way, add the following package.
6.Create first test
7.Create first Parametrized tests
• Now create another folder under the project
give the TestClass and create one test class
under this folder to write the unit test cases to
test the Class1
• Here we are using the power
of xUnit, FACT and Theory:
• FACT is used for individual
test.
• Theory is used for
parameterized tests.
• Fact is being used with
testAdd method and Theory
with testPrime method.
9.Execute tests with Visual Studio
Code using xUnit testing framework
• Now go to TestClass, click the Run All Tests.
• Here is the output:
Thank you

More Related Content

What's hot (20)

Introduction to JUnit testing in OpenDaylight
Introduction to JUnit testing in OpenDaylightIntroduction to JUnit testing in OpenDaylight
Introduction to JUnit testing in OpenDaylight
 
Unit testing with NUnit
Unit testing with NUnitUnit testing with NUnit
Unit testing with NUnit
 
How and what to unit test
How and what to unit testHow and what to unit test
How and what to unit test
 
Unit Testing Using N Unit
Unit Testing Using N UnitUnit Testing Using N Unit
Unit Testing Using N Unit
 
Unit test
Unit testUnit test
Unit test
 
Unit tests and TDD
Unit tests and TDDUnit tests and TDD
Unit tests and TDD
 
Selenium with testng and eclipse ide
Selenium with testng and eclipse ideSelenium with testng and eclipse ide
Selenium with testng and eclipse ide
 
Test ng
Test ngTest ng
Test ng
 
Unit testing in Unity
Unit testing in UnityUnit testing in Unity
Unit testing in Unity
 
Testing In Java
Testing In JavaTesting In Java
Testing In Java
 
TestNG with selenium
TestNG with seleniumTestNG with selenium
TestNG with selenium
 
Junit4&testng presentation
Junit4&testng presentationJunit4&testng presentation
Junit4&testng presentation
 
Unit test in drupal 8 by Pratomo Ardianto Drupalcamp Cebu 2018
Unit test in drupal 8 by Pratomo Ardianto Drupalcamp Cebu 2018Unit test in drupal 8 by Pratomo Ardianto Drupalcamp Cebu 2018
Unit test in drupal 8 by Pratomo Ardianto Drupalcamp Cebu 2018
 
.Net Unit Testing with Visual Studio 2010
.Net Unit Testing with Visual Studio 2010.Net Unit Testing with Visual Studio 2010
.Net Unit Testing with Visual Studio 2010
 
TestNg_Overview_Config
TestNg_Overview_ConfigTestNg_Overview_Config
TestNg_Overview_Config
 
TestNG vs JUnit: cease fire or the end of the war
TestNG vs JUnit: cease fire or the end of the warTestNG vs JUnit: cease fire or the end of the war
TestNG vs JUnit: cease fire or the end of the war
 
Automated Unit Testing
Automated Unit TestingAutomated Unit Testing
Automated Unit Testing
 
Selenium with java
Selenium with javaSelenium with java
Selenium with java
 
TestNG introduction
TestNG introductionTestNG introduction
TestNG introduction
 
Workshop unit test
Workshop   unit testWorkshop   unit test
Workshop unit test
 

Similar to Getting Started with xUnit and .NET Core Unit Testing in VSCode

Lesson 02 - React Native Development Environment Setup
Lesson 02 - React Native Development Environment SetupLesson 02 - React Native Development Environment Setup
Lesson 02 - React Native Development Environment SetupUniversity of Catania
 
The Ring programming language version 1.2 book - Part 51 of 84
The Ring programming language version 1.2 book - Part 51 of 84The Ring programming language version 1.2 book - Part 51 of 84
The Ring programming language version 1.2 book - Part 51 of 84Mahmoud Samir Fayed
 
PT1420 File Access and Visual Basic .docx
PT1420 File Access and Visual Basic                      .docxPT1420 File Access and Visual Basic                      .docx
PT1420 File Access and Visual Basic .docxamrit47
 
Game Programming 06 - Automated Testing
Game Programming 06 - Automated TestingGame Programming 06 - Automated Testing
Game Programming 06 - Automated TestingNick Pruehs
 
The Ring programming language version 1.5.4 book - Part 71 of 185
The Ring programming language version 1.5.4 book - Part 71 of 185The Ring programming language version 1.5.4 book - Part 71 of 185
The Ring programming language version 1.5.4 book - Part 71 of 185Mahmoud Samir Fayed
 
Prg 218 entire course
Prg 218 entire coursePrg 218 entire course
Prg 218 entire coursegrades4u
 
Eclipse IDE, 2019.09, Java Development
Eclipse IDE, 2019.09, Java Development Eclipse IDE, 2019.09, Java Development
Eclipse IDE, 2019.09, Java Development Pei-Hsuan Hsieh
 
Software industrialization
Software industrializationSoftware industrialization
Software industrializationBibek Lama
 
Testing in Craft CMS
Testing in Craft CMSTesting in Craft CMS
Testing in Craft CMSJustinHolt20
 
Tutorial ranorex
Tutorial ranorexTutorial ranorex
Tutorial ranorexradikalzen
 
Azure DevOps Extensions
Azure DevOps ExtensionsAzure DevOps Extensions
Azure DevOps ExtensionsChristian Waha
 
The Ring programming language version 1.5.2 book - Part 68 of 181
The Ring programming language version 1.5.2 book - Part 68 of 181The Ring programming language version 1.5.2 book - Part 68 of 181
The Ring programming language version 1.5.2 book - Part 68 of 181Mahmoud Samir Fayed
 
HoloLens Unity Build Pipelines on Azure DevOps
HoloLens Unity Build Pipelines on Azure DevOpsHoloLens Unity Build Pipelines on Azure DevOps
HoloLens Unity Build Pipelines on Azure DevOpsSarah Sexton
 
Csharp Hands On Lab Paul Yao
Csharp Hands On Lab Paul YaoCsharp Hands On Lab Paul Yao
Csharp Hands On Lab Paul YaoMamgmo Magnda
 
IoTSuite User Manual
IoTSuite User ManualIoTSuite User Manual
IoTSuite User ManualPankesh Patel
 
BRiffle DQ - Import and open samples
BRiffle DQ - Import and open samplesBRiffle DQ - Import and open samples
BRiffle DQ - Import and open samplesflexriver
 

Similar to Getting Started with xUnit and .NET Core Unit Testing in VSCode (20)

Lesson 02 - React Native Development Environment Setup
Lesson 02 - React Native Development Environment SetupLesson 02 - React Native Development Environment Setup
Lesson 02 - React Native Development Environment Setup
 
The Ring programming language version 1.2 book - Part 51 of 84
The Ring programming language version 1.2 book - Part 51 of 84The Ring programming language version 1.2 book - Part 51 of 84
The Ring programming language version 1.2 book - Part 51 of 84
 
PT1420 File Access and Visual Basic .docx
PT1420 File Access and Visual Basic                      .docxPT1420 File Access and Visual Basic                      .docx
PT1420 File Access and Visual Basic .docx
 
Game Programming 06 - Automated Testing
Game Programming 06 - Automated TestingGame Programming 06 - Automated Testing
Game Programming 06 - Automated Testing
 
The Ring programming language version 1.5.4 book - Part 71 of 185
The Ring programming language version 1.5.4 book - Part 71 of 185The Ring programming language version 1.5.4 book - Part 71 of 185
The Ring programming language version 1.5.4 book - Part 71 of 185
 
Prg 218 entire course
Prg 218 entire coursePrg 218 entire course
Prg 218 entire course
 
Eclipse IDE, 2019.09, Java Development
Eclipse IDE, 2019.09, Java Development Eclipse IDE, 2019.09, Java Development
Eclipse IDE, 2019.09, Java Development
 
NDK Introduction
NDK IntroductionNDK Introduction
NDK Introduction
 
Software industrialization
Software industrializationSoftware industrialization
Software industrialization
 
Testing in Craft CMS
Testing in Craft CMSTesting in Craft CMS
Testing in Craft CMS
 
Tutorial ranorex
Tutorial ranorexTutorial ranorex
Tutorial ranorex
 
DotNetNuke
DotNetNukeDotNetNuke
DotNetNuke
 
Azure DevOps Extensions
Azure DevOps ExtensionsAzure DevOps Extensions
Azure DevOps Extensions
 
Web works hol
Web works holWeb works hol
Web works hol
 
The Ring programming language version 1.5.2 book - Part 68 of 181
The Ring programming language version 1.5.2 book - Part 68 of 181The Ring programming language version 1.5.2 book - Part 68 of 181
The Ring programming language version 1.5.2 book - Part 68 of 181
 
HoloLens Unity Build Pipelines on Azure DevOps
HoloLens Unity Build Pipelines on Azure DevOpsHoloLens Unity Build Pipelines on Azure DevOps
HoloLens Unity Build Pipelines on Azure DevOps
 
Csharp Hands On Lab Paul Yao
Csharp Hands On Lab Paul YaoCsharp Hands On Lab Paul Yao
Csharp Hands On Lab Paul Yao
 
IoTSuite User Manual
IoTSuite User ManualIoTSuite User Manual
IoTSuite User Manual
 
BRiffle DQ - Import and open samples
BRiffle DQ - Import and open samplesBRiffle DQ - Import and open samples
BRiffle DQ - Import and open samples
 
Node.js
Node.jsNode.js
Node.js
 

Recently uploaded

A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 

Recently uploaded (20)

A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 

Getting Started with xUnit and .NET Core Unit Testing in VSCode

  • 1. Unit testing with –xUnit+C# + VSCode
  • 2. Hi All, In this my first article, I will explain getting started with xUnit open source testing framework and .NET Core using open source code editor VSCode ,showing you how you can create and run your first set of unit tests. Hi All, In this my first article, I will explain getting started with xUnit open source testing framework and .NET Core using open source code editor VSCode ,showing you how you can create and run your first set of unit tests. 1. Download the .NET SDK 2. Download the Visual Studio Code 3. Add C# extension 4. Create the unit test project 5. Add xUnit testing framework package 6. Create first test 7. Create first Parametrized tests 8. Execute tests with Visual Studio Code using xUnit testing framework
  • 3. Download and install the .NET SDK • Go to https://dotnet.microsoft.com/download/dotnet-core/2.2 • Download the SDK based on your machine configuration. Here I am using x64 and window7. 1. Download and install the .NET SDK
  • 4. 2. Download and install the VSCode using following link https://code.visualstudio.com/
  • 5. 3. Add the C# extension • Open the VSCode editor,
  • 6. • Click Ctrl + Shift + X to open the Extension search box to add the C# omni extension, Search C# for visual and install it.
  • 7. 4.Create the unit test project • Now type Ctrl+Shift+E to open the Project explorer
  • 8. • Now Click “Add Folder” and create one folder XUnitTestProject. Click the “Add” to add this folder into the workspace.
  • 9. • Now the project is added in our workspace.
  • 10. • Right click on the project XUnitTestProject add new folder “src” then add another folder obj- >objects inside it.
  • 11. • Right click on Objects folder and select the new file, add name Class1.cs. • Add following code in the class. • In this class, two methods are to return the sum of two numbers and another method to check the prime number.
  • 12. • Now go to terminal and type following command to build the project and it will generate the project related files. • Type “dotnet build” in the termial.
  • 13. 5. Add xUnit testing framework package • Type Ctrl+Shift+P to open the NuGet Package Manager: Add Package
  • 14. • Now double click the NuGet Package Manager.
  • 15. • Now type the “xUnit” and hit enter. Select xunit ,hit enter again and choose the 2.4.1 version
  • 16. • Now the xunit will be added in the project config file
  • 17. • In similer way, add the following package.
  • 18. 6.Create first test 7.Create first Parametrized tests • Now create another folder under the project give the TestClass and create one test class under this folder to write the unit test cases to test the Class1
  • 19. • Here we are using the power of xUnit, FACT and Theory: • FACT is used for individual test. • Theory is used for parameterized tests. • Fact is being used with testAdd method and Theory with testPrime method.
  • 20. 9.Execute tests with Visual Studio Code using xUnit testing framework • Now go to TestClass, click the Run All Tests.
  • 21. • Here is the output:
  • 22.