public PlexApiTest() { var browserOpenerMock = new Mock <IBrowserOpener>(); browserOpenerMock .Setup(mock => mock.OpenBrowser(It.IsAny <string>())) .Returns <string>(param => Task.CompletedTask); this.browserOpener = browserOpenerMock.Object; }
public PlexClientApi(HttpClient client, IBrowserOpener browserOpener) { this.browserOpener = browserOpener; client.BaseAddress = new Uri("https://plex.tv"); plexTvApiJson = RestService.For <IPlexTvApi>(client); plexTvApiXml = RestService.For <IPlexTvApi>(client, new RefitSettings { ContentSerializer = new XmlContentSerializer( new XmlContentSerializerSettings { XmlReaderWriterSettings = new XmlReaderWriterSettings() { ReaderSettings = new XmlReaderSettings { IgnoreWhitespace = true } } } ) }); }