Allows choosing and managing each tool

This commit is contained in:
Guillaume Tâche
2024-10-03 21:55:14 +02:00
parent 0a2f9e0c31
commit df58cf4585
117 changed files with 1547 additions and 1515 deletions

View File

@@ -1,5 +1,6 @@
package com.github.gtache.autosubtitle.setup.conda;
import com.github.gtache.autosubtitle.ToolType;
import com.github.gtache.autosubtitle.impl.OS;
import com.github.gtache.autosubtitle.process.ProcessRunner;
import com.github.gtache.autosubtitle.setup.SetupException;
@@ -42,6 +43,11 @@ public class CondaSetupManager extends AbstractSetupManager {
return "conda";
}
@Override
public ToolType type() {
return null; //Just an intermediary tool
}
@Override
protected SetupStatus getStatus() throws SetupException {
if (isSystemCondaInstalled()) {

View File

@@ -68,6 +68,11 @@ class TestCondaSetupManager {
assertEquals("conda", condaSetupManager.name());
}
@Test
void testType() {
assertNull(condaSetupManager.type());
}
@Test
void testGetStatusIsSystemInstalled() throws SetupException {
assertEquals(SetupStatus.SYSTEM_INSTALLED, condaSetupManager.getStatus());