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

GetStaticMethodContext() public method

Gets information of the static test method.
public GetStaticMethodContext ( ) : ITestMethodContext
return ITestMethodContext
        public override ITestMethodContext GetStaticMethodContext()
        {
            return new TestMethodContext(
                this.testMethod.MethodInfo, this.actualMethod.MethodInfo, null, null);
        }

Usage Example

        public void GetStaticMethodContextReturnsCorrectResult()
        {
            var testMethod = Mocked.Of<IMethodInfo>();
            var actualMethod = Mocked.Of<IMethodInfo>();
            var sut = new StaticTestCaseCommandContext(
                testMethod,
                actualMethod,
                Mocked.Of<ISpecimenBuilderFactory>(),
                new object[0]);

            var actual = sut.GetStaticMethodContext();

            actual.AssertHasCorrectValues(testMethod.MethodInfo, actualMethod.MethodInfo, null, null);
        }