public void CreateCorrespondingProtocolExtractor_CreatesEdgeProtocolUrlExtractor() { var validUri = new Uri("microsoft-edge:?launchContext1=..."); var factory = new ProtocolExtractorFactory(); var extractor = factory.CreateCorrespondingProtocolExtractor(validUri); Assert.IsType <EdgeProtocolExtractor>(extractor); }
public void CreateCorrespondingProtocolExtractor_ReturnsNull() { var invalidUri = new Uri("edge:?launchContext1=..."); var factory = new ProtocolExtractorFactory(); var extractor = factory.CreateCorrespondingProtocolExtractor(invalidUri); Assert.Null(extractor); }
public void ExtractProtocol(Uri uri) { if (uri == null) { throw new ArgumentNullException(nameof(uri)); } var extractor = _extractorFactory.CreateCorrespondingProtocolExtractor(uri); _protocol = extractor?.Parse(); }