17
17
import java .util .concurrent .atomic .AtomicReference ;
18
18
import java .util .function .Consumer ;
19
19
20
- import static org .junit .jupiter .api .Assertions .assertEquals ;
21
- import static org .junit .jupiter .api .Assertions .assertThrows ;
20
+ import static org .junit .jupiter .api .Assertions .*;
22
21
23
22
/**
24
23
* Contains tests for testing the info controller and parser objects.
@@ -119,7 +118,7 @@ void testPluginDetailsExtended() throws ArgumentParserException {
119
118
> Authors : Hello world
120
119
> Commands : comm
121
120
""" .trim () + "\n " ;
122
- assertEquals (ColorLogger .trimNoColor (output .get ()), expected );
121
+ assertEquals (expected , ColorLogger .trimNoColor (output .get ()));
123
122
}
124
123
125
124
/**
@@ -128,17 +127,12 @@ void testPluginDetailsExtended() throws ArgumentParserException {
128
127
@ Test
129
128
void testPluginDetailsDirectly () throws PluginNotFoundException
130
129
{
131
- controller .info ("My Plugin2" );
132
-
133
- var expected = """
134
- Plugin Info:
135
- > Name : My Plugin2
136
- > Main : org.My Plugin2
137
- > Version : v1.1
138
- > Description : bc
139
- > Authors : Hello world
140
- > Commands : comm
141
- """ .trim () + "\n " ;
142
- assertEquals (ColorLogger .trimNoColor (output .get ()), expected );
130
+ var yml = controller .info ("My Plugin2" );
131
+ assertEquals (yml .name (), "My Plugin2" );
132
+ assertEquals (yml .main (), "org.My Plugin2" );
133
+ assertEquals (yml .version (), "v1.1" );
134
+ assertEquals (yml .description (), "bc" );
135
+ assertEquals (yml .getFirstAuthor (), "Hello world" );
136
+ assertTrue (yml .commands ().containsKey ("comm" ));
143
137
}
144
138
}
0 commit comments