public void Implements_generic_should_throw_when_interfaceType_is_not_an_interface_type() { var source = typeof(Stream); Action act = () => InternalExtensions.Implements <String>(source); act.ShouldThrow <ArgumentException>().And.ParamName.Should().Be("interfaceType"); }
public void Implements_should_throw_when_interfaceType_is_null() { var source = typeof(Stream); Action act = () => InternalExtensions.Implements(source, null); act.ShouldThrow <ArgumentNullException>().And.ParamName.Should().Be("interfaceType"); }
public void Implements_should_return_true_when_source_does_implement_the_interface() { var source = typeof(String); var interfaceType = typeof(IDisposable); InternalExtensions.Implements(source, interfaceType).Should().BeFalse(); }
public void Implements_should_throw_when_source_is_null() { var interfaceType = typeof(IDisposable); Action act = () => InternalExtensions.Implements(null, interfaceType); act.ShouldThrow <ArgumentNullException>().And.ParamName.Should().Be("source"); }
public void Implements_generic_should_return_false_when_source_does_not_implement_the_interface() { var source = typeof(Stream); InternalExtensions.Implements <IDisposable>(source).Should().BeTrue(); }