Jwc.Experiment.Xunit.StaticTestCaseCommandContext.GetMethodContext C# (CSharp) Method

GetMethodContext() public method

Gets information of the test method.
public GetMethodContext ( object testObject ) : ITestMethodContext
testObject object /// The test object. ///
return ITestMethodContext
        public override ITestMethodContext GetMethodContext(object testObject)
        {
            if (testObject == null)
                throw new ArgumentNullException("testObject");

            return new TestMethodContext(
                this.testMethod.MethodInfo, this.actualMethod.MethodInfo, testObject, null);
        }

Usage Example

 public void GetMethodContextWithNullTestObjectThrows()
 {
     var sut = new StaticTestCaseCommandContext(
         Mocked.Of<IMethodInfo>(),
         Mocked.Of<IMethodInfo>(),
         Mocked.Of<ISpecimenBuilderFactory>(),
         new object[0]);
     Assert.Throws<ArgumentNullException>(() => sut.GetMethodContext(null));
 }
All Usage Examples Of Jwc.Experiment.Xunit.StaticTestCaseCommandContext::GetMethodContext