public void CreateWithNullThrows() { var owner = new object(); var sut = new MissingParametersSupplyingMethodFactory(owner); Assert.Throws <ArgumentNullException>(() => sut.Create(null)); }
public void SutIsIMethodFactory() { var owner = new object(); var sut = new MissingParametersSupplyingMethodFactory(owner); Assert.IsAssignableFrom <IMethodFactory>(sut); }
public void OwnerIsCorrect() { var owner = new object(); var sut = new MissingParametersSupplyingMethodFactory(owner); Assert.Equal(owner, sut.Owner); }
public void CreateReturnsCorrectResult() { Action dummy = () => { }; var owner = new object(); var sut = new MissingParametersSupplyingMethodFactory(owner); var result = sut.Create(dummy.GetMethodInfo()); var expected = new MissingParametersSupplyingMethod(new InstanceMethod(dummy.GetMethodInfo(), owner)); Assert.Equal(expected, result); }