public void WorksCorrectlyWithNullValues() { var resolver = new DefaultResolver <object>(NullLogger <CommandLineParser> .Instance, ServiceProvider); Assert.False(resolver.CanResolve((ArgumentModel)null)); Assert.False(resolver.CanResolve((string)null)); Assert.Null(resolver.Resolve((ArgumentModel)null)); Assert.Null(resolver.Resolve((string)null)); }
public void Resolve_ShouldCreateInstanceByTypeOfType() { var resolver = new DefaultResolver(); var instance = resolver.Resolve(typeof(AppleException)); instance.Should().NotBeNull(); instance.Should().BeOfType <AppleException>(); }