public GetMethodContext ( object testObject ) : ITestMethodContext | ||
testObject | object | /// The test object. /// |
리턴 | ITestMethodContext |
public void GetMethodContextWithNullThrows() { var sut = new ParameterizedCommandContext( Mocked.Of<IMethodInfo>(), Mocked.Of<ISpecimenBuilderFactory>(), Mocked.Of<IEnumerable<object>>()); Assert.Throws<ArgumentNullException>(() => sut.GetMethodContext(null)); }
public void GetMethodContextReturnsCorrectResult() { var testMethod = Mocked.Of<IMethodInfo>(); var sut = new ParameterizedCommandContext( testMethod, Mocked.Of<ISpecimenBuilderFactory>(), Mocked.Of<IEnumerable<object>>()); var testObject = new object(); var actual = sut.GetMethodContext(testObject); actual.AssertHasCorrectValues( testMethod.MethodInfo, testMethod.MethodInfo, testObject, testObject); }