Skip to content

Commit

Permalink
Sarthak | Adds missing test for CommandsTest
Browse files Browse the repository at this point in the history
  • Loading branch information
SarthakMakhija committed Jan 10, 2025
1 parent fb7cb3c commit b3efdf9
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/test/java/com/codurance/training/commands/CommandsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,20 @@
import java.io.StringWriter;
import java.util.List;

import static org.junit.Assert.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThrows;

public class CommandsTest {

@Test
public void attemptToExecuteAnUnsupportedCommand() {
StringWriter writer = new StringWriter();

Commands commands = new Commands(writer);
assertThrows(IllegalArgumentException.class,
() -> commands.execute(new CommandDescription("unsupported", new Arguments(List.of("project", "caizin")))));
}

@Test
public void executeAddTaskInAProjectFollowedByShow() throws Exception {
StringWriter writer = new StringWriter();
Expand Down

0 comments on commit b3efdf9

Please sign in to comment.