Skip to content

Commit

Permalink
Fix IndexerWebAccessTest
Browse files Browse the repository at this point in the history
  • Loading branch information
theotherp committed Apr 6, 2024
1 parent 2ddaeec commit b3f02a0
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class IndexerWebAccessTest {
private ConfigProvider configProviderMock;
@Mock
private WebAccess webAccessMock;
private IndexerConfig indexerConfig = new IndexerConfig();
private final IndexerConfig indexerConfig = new IndexerConfig();
@Mock
private Unmarshaller unmarshallerMock;
@Captor
Expand All @@ -46,10 +46,11 @@ public class IndexerWebAccessTest {

@BeforeEach
public void setUp() throws Exception {
MockitoAnnotations.initMocks(this);
String xml = "<?xml version=\"1.0\" ?>\n" +
"<metadata>\n" +
"</metadata>";
MockitoAnnotations.openMocks(this);
String xml = """
<?xml version="1.0" encoding="UTF-8"?>\
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:newznab="http://www.newznab.com/DTD/2010/feeds/attributes/" encoding="utf-8">
<channel/></rss>""";
when(webAccessMock.callUrl(anyString(), headersCaptor.capture(), timeoutCaptor.capture())).thenReturn(xml);
BaseConfig baseConfig = new BaseConfig();
baseConfig.setSearching(searchingConfigMock);
Expand Down

0 comments on commit b3f02a0

Please sign in to comment.