public GetMethodContext ( object testObject ) : ITestMethodContext | ||
testObject | object | /// The test object. /// |
return | ITestMethodContext |
public void GetMethodContextWithNullTestObjectThrows() { var sut = new TestCaseCommandContext( Mocked.Of<IMethodInfo>(), Mocked.Of<IMethodInfo>(), new object(), Mocked.Of<ISpecimenBuilderFactory>(), new object[0]); Assert.Throws<ArgumentNullException>(() => sut.GetMethodContext(null)); }
public void GetMethodContextReturnsCorrectResult() { var testMethod = Mocked.Of<IMethodInfo>(); var actualMethod = Mocked.Of<IMethodInfo>(); var actualObject = new object(); var sut = new TestCaseCommandContext( testMethod, actualMethod, actualObject, Mocked.Of<ISpecimenBuilderFactory>(), new object[0]); var testObject = new object(); var actual = sut.GetMethodContext(testObject); actual.AssertHasCorrectValues(testMethod.MethodInfo, actualMethod.MethodInfo, testObject, actualObject); }