/src/NUnit/core/NUnitTestMethod.cs
C# | 39 lines | 21 code | 5 blank | 13 comment | 0 complexity | bad58a28612781a0c3bdb461d31a3c74 MD5 | raw file
Possible License(s): GPL-2.0
- // ****************************************************************
- // Copyright 2007, Charlie Poole
- // This is free software licensed under the NUnit license. You may
- // obtain a copy of the license at http://nunit.org.
- // ****************************************************************
- using System;
- using System.Reflection;
-
- namespace NUnit.Core
- {
- /// <summary>
- /// Class to implement an NUnit test method
- /// </summary>
- public class NUnitTestMethod : TestMethod
- {
- #region Constructor
- public NUnitTestMethod(MethodInfo method) : base(method)
- {
- }
- #endregion
-
- #region TestMethod Overrides
-
- /// <summary>
- /// Run a test returning the result. Overrides TestMethod
- /// to count assertions.
- /// </summary>
- /// <param name="testResult"></param>
- public override TestResult RunTest()
- {
- TestResult testResult = base.RunTest();
-
- testResult.AssertCount = NUnitFramework.Assert.GetAssertCount();
-
- return testResult;
- }
- #endregion
- }
- }