[Test] public void TestMethod() { // some test logic here Assert.AreEqual(2+2, 4); } TestResult result = new TestResult(); result.ResultState = ResultState.Success;In the above example, a simple test case is written using NUnit's `Assert` class to check if 2+2 equals 4. The `TestResult` object is then created and its `ResultState` property is set to `ResultState.Success` since the test passed. NUnit.Core TestResult is part of the NUnit testing framework's core package library.