Skip to content

Commit

Permalink
Upgrade to JUnit 5
Browse files Browse the repository at this point in the history
  • Loading branch information
slachiewicz committed May 15, 2023
1 parent 2283926 commit 5dfa486
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 14 deletions.
6 changes: 6 additions & 0 deletions plexus-interactivity-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.9.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,34 +24,34 @@
* SOFTWARE.
*/

import org.junit.Test;
import org.junit.jupiter.api.Test;

import java.util.List;

import static java.util.Arrays.asList;
import static java.util.Objects.requireNonNull;
import static org.junit.Assert.assertEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;

public class DefaultPrompterTest
{
@Test
public void promptSimple() throws PrompterException {
void promptSimple() throws PrompterException {
final InMemoryOutput out = new InMemoryOutput();
final Prompter prompter = new DefaultPrompter( out, new InMemoryInput( "ok" ) );
prompter.prompt( "test" );
assertEquals( "test: ", out.builder.toString() );
}

@Test
public void promptOption() throws PrompterException {
void promptOption() throws PrompterException {
final InMemoryOutput out = new InMemoryOutput();
final Prompter prompter = new DefaultPrompter( out, new InMemoryInput( "ok" ) );
prompter.prompt( "test", "value" );
assertEquals("test value: ", out.builder.toString());
}

@Test
public void promptOptions() throws PrompterException {
void promptOptions() throws PrompterException {
final InMemoryOutput out = new InMemoryOutput();
final Prompter prompter = new DefaultPrompter( out, new InMemoryInput( "yes" ) );
prompter.prompt( "test", asList( "yes", "no" ), "value" );
Expand Down
9 changes: 0 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,4 @@
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>

0 comments on commit 5dfa486

Please sign in to comment.