Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to JUnit 5 #38

Merged
merged 1 commit into from
May 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>