int num1 = 10; int num2 = 5; Assert.IsTrue(num1 > num2);
string name = "John"; Assert.AreEqual("John", name);
int num = 10; Assert.ThrowsThis assertion will pass because dividing by zero will throw a DivideByZeroException. Package library: NUnit.Framework Overall, Assert is a useful tool for writing unit tests in C# and is available in various package libraries, such as Microsoft.VisualStudio.TestTools.UnitTesting and NUnit.Framework.(() => { var result = num / 0; });