Skip to content

Commit

Permalink
Sarthak | Removes redundant 'throws exception' from AddProject and Ad…
Browse files Browse the repository at this point in the history
…dTask commands
  • Loading branch information
SarthakMakhija committed Jan 10, 2025
1 parent b3efdf9 commit 6b02902
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class AddProjectCommand implements Command {
this.projects = projects;
}

public void execute(Arguments arguments) throws Exception {
public void execute(Arguments arguments) {
assert (arguments.size() == 1);
String projectName = arguments.get(0);
projects.addProject(projectName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class AddTaskCommand implements Command {
this.projects = projects;
}

public void execute(Arguments arguments) throws Exception {
public void execute(Arguments arguments) {
assert (arguments.size() == 2);
String projectName = arguments.get(0);
String taskDescription = arguments.get(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public void attemptToExecuteAddProjectCommandGivenNoArgumentsAreProvided() {
}

@Test
public void executeAddProjectCommandByAddingAProject() throws Exception {
public void executeAddProjectCommandByAddingAProject() {
Projects projects = new Projects();

AddProjectCommand addProjectCommand = new AddProjectCommand(projects);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public void attemptToExecuteAddTaskCommandGivenOnlyOneArgumentIsProvided() {
}

@Test
public void executeCheckCommandByAddingATaskToAProject() throws Exception {
public void executeCheckCommandByAddingATaskToAProject() {
Projects projects = new Projects();
projects.addProject("caizin");

Expand Down

0 comments on commit 6b02902

Please sign in to comment.