How to pass assertions with C#-Nunit?

How to pass assertions with C#-Nunit?

Hey Toby,

Before NUnit 2.4, Classic Model was used for using NUnit asserts. In this model, each NUnit assert was used via a separate method of the Assert Class. From NUnit 2.4 onwards, Constraint Model was introduced where a single Assert Class method was used. The constraint Object is passed as an argument with the details of the test that needs to be performed.

Reference: How To Use Asserts In NUnit Using Selenium? | LambdaTest

Sample syntax:

Assert.That( myString, Is.EqualTo("LambdaTest") );