public void SelectMethodsConstructorNotFoundThrows(params Type[] parameterTypes) { var sut = new SutAlias(parameterTypes); var ex = Record.Exception(() => sut.SelectMethods(typeof(SelectConstructorTestClass))); Assert.IsType <ArgumentException>(ex); }
public void SelectMethodsConstructorFoundReturnsSingleConstructor() { var expected = typeof(SelectConstructorTestClass) .GetConstructor(new Type[] { typeof(int) }); var sut = new SutAlias(typeof(int)); var actual = sut.SelectMethods(typeof(SelectConstructorTestClass)); Assert.Single(actual); Assert.IsType <ConstructorMethod>(actual.First()); Assert.Equal(expected, ((ConstructorMethod)actual.First()).Constructor); }