public void Setup() { _applicationPaths = Substitute.For <IApplicationPaths>(); _fileCache = Substitute.For <IFileCache>(); _mappingListData = new AnimeMappingListData(); _applicationPaths.CachePath.Returns(""); _fileCache.GetFileContentAsync(Arg.Is <MappingsFileSpec>(s => s.LocalPath == "anime-list.xml"), CancellationToken.None) .Returns(x => _mappingListData); _mappingList = new MappingList(_applicationPaths, _fileCache); }
private static bool IsValidData(AnimeMappingListData data) { return(data?.AnimeSeriesMapping != null); }