public void Should_return_previously_provided_handler() { // ReSharper disable once ConvertToLocalFunction EventHandler <ITestAbstraction> handler = (s, args) => { }; var mappedHandler = _lookup.MapForAttachment(handler, impl => new TestAdapter()); var mappedHandlerForDetachment = _lookup.TryMapForDetachment(handler); mappedHandler.Should().Be(mappedHandlerForDetachment); }
public void Should_return_null_if_handler_is_null() { var handler = _lookup.MapForAttachment(null, implementation => new TestAdapter()); handler.Should().BeNull(); }