Skip to content

Commit e33eb91

Browse files
committed
[F] Fix build
1 parent 1856cfa commit e33eb91

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/main/java/org/hydev/mcpm/client/arguments/ParserFactory.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import org.hydev.mcpm.client.arguments.parsers.*;
44
import org.hydev.mcpm.client.display.presenters.InstallPresenter;
5+
import org.hydev.mcpm.client.display.presenters.KVInfoPresenter;
56
import org.hydev.mcpm.client.display.presenters.SearchPresenter;
67
import org.hydev.mcpm.client.display.presenters.UninstallPresenter;
78

@@ -24,6 +25,7 @@ public static List<CommandParser> baseParsers(ControllerFactoryBoundary factory)
2425
var searchPresenter = new SearchPresenter(factory.pageBoundary());
2526
var installPresenter = new InstallPresenter();
2627
var uninstallPresenter = new UninstallPresenter();
28+
var infoPresenter = new KVInfoPresenter();
2729

2830
/*
2931
* Add general parsers to this list!
@@ -36,7 +38,7 @@ public static List<CommandParser> baseParsers(ControllerFactoryBoundary factory)
3638
new ListParser(factory.listController()),
3739
new SearchParser(factory.searchController(), searchPresenter),
3840
new MirrorParser(factory.mirrorController()),
39-
new InfoParser(factory.infoController()),
41+
new InfoParser(factory.infoController(), infoPresenter),
4042
new InstallParser(factory.installController(), installPresenter),
4143
new RefreshParser(factory.refreshController()),
4244
new PageParser(factory.pageBoundary()),

src/test/java/org/hydev/mcpm/client/arguments/InfoParserTest.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
import org.hydev.mcpm.client.commands.controllers.InfoController;
66
import org.hydev.mcpm.client.database.MockPluginTracker;
77
import org.hydev.mcpm.client.database.PluginMockFactory;
8+
import org.hydev.mcpm.client.display.presenters.KVInfoPresenter;
9+
import org.hydev.mcpm.client.loader.PluginNotFoundException;
810
import org.hydev.mcpm.client.models.PluginCommand;
911
import org.hydev.mcpm.utils.ColorLogger;
1012
import org.junit.jupiter.api.BeforeEach;
@@ -51,7 +53,7 @@ public void setup() {
5153

5254
var tracker = new MockPluginTracker(plugins);
5355
controller = new InfoController(tracker);
54-
var parser = new InfoParser(controller);
56+
var parser = new InfoParser(controller, new KVInfoPresenter());
5557
args = new ArgsParser(List.of(parser));
5658
}
5759

@@ -124,8 +126,9 @@ void testPluginDetailsExtended() throws ArgumentParserException {
124126
* Tests whether the info parser will present the correct message when invoked via controller.
125127
*/
126128
@Test
127-
void testPluginDetailsDirectly() {
128-
controller.info("My Plugin2", log);
129+
void testPluginDetailsDirectly() throws PluginNotFoundException
130+
{
131+
controller.info("My Plugin2");
129132

130133
var expected = """
131134
Plugin Info:

0 commit comments

Comments
 (0)