public void ParameterTypesShouldReturnWrappedTestMethodParameterTypes() { // Arrange var parameterTypes = typeof(TestMethodInfoAdapterTests).GetMethod(nameof(TestMethod)).GetParameters(); var testMethodMock = new Mock <ITestMethod>(); testMethodMock.SetupGet(m => m.ParameterTypes) .Returns(parameterTypes); var sut = new TestMethodInfoAdapter(testMethodMock.Object); // Act var actual = sut.ParameterTypes; // Assert Assert.AreEqual(parameterTypes, actual); }
public void MethodInfoShouldReturnWrappedTestMethodMethodInfo() { // Arrange var methodInfo = typeof(TestMethodInfoAdapterTests).GetMethod(nameof(TestMethod)); var testMethodMock = new Mock <ITestMethod>(); testMethodMock.SetupGet(m => m.MethodInfo) .Returns(methodInfo); var sut = new TestMethodInfoAdapter(testMethodMock.Object); // Act var actual = sut.MethodInfo; // Assert Assert.AreEqual(methodInfo, actual); }