Skip to content

Commit

Permalink
remove unused Exception from the Test methods
Browse files Browse the repository at this point in the history
  • Loading branch information
yashpal2104 committed Jan 6, 2025
1 parent c2173f5 commit 87900f1
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static void setUp() throws IOException {
}

@Test
public void getPriority_returnsPriorityFromParameter() throws Exception {
public void getPriority_returnsPriorityFromParameter() {
StringParameterValue param = new StringParameterValue("priority", "5");
ParametersAction action = new ParametersAction(param);
Queue.Item item = new Queue.WaitingItem(Calendar.getInstance(), project, Collections.singletonList(action));
Expand All @@ -43,7 +43,7 @@ public void getPriority_returnsPriorityFromParameter() throws Exception {
}

@Test
public void getPriority_returnsDefaultPriorityWhenParameterIsMissing() throws Exception {
public void getPriority_returnsDefaultPriorityWhenParameterIsMissing() {
Queue.Item item = new Queue.WaitingItem(Calendar.getInstance(), project, Collections.emptyList());

int priority = strategy.getPriority(item);
Expand All @@ -52,7 +52,7 @@ public void getPriority_returnsDefaultPriorityWhenParameterIsMissing() throws Ex
}

@Test
public void getPriority_returnsDefaultPriorityWhenParameterIsNotANumber() throws Exception {
public void getPriority_returnsDefaultPriorityWhenParameterIsNotANumber() {
StringParameterValue param = new StringParameterValue("priority", "not-a-number");
ParametersAction action = new ParametersAction(param);
Queue.Item item = new Queue.WaitingItem(Calendar.getInstance(), project, Collections.singletonList(action));
Expand All @@ -63,7 +63,7 @@ public void getPriority_returnsDefaultPriorityWhenParameterIsNotANumber() throws
}

@Test
public void isApplicable_returnsTrueWhenParameterIsPresentAndValid() throws Exception {
public void isApplicable_returnsTrueWhenParameterIsPresentAndValid() {
StringParameterValue param = new StringParameterValue("priority", "5");
ParametersAction action = new ParametersAction(param);
Queue.Item item = new Queue.WaitingItem(Calendar.getInstance(), project, Collections.singletonList(action));
Expand All @@ -72,14 +72,14 @@ public void isApplicable_returnsTrueWhenParameterIsPresentAndValid() throws Exce
}

@Test
public void isApplicable_returnsFalseWhenParameterIsMissing() throws Exception {
public void isApplicable_returnsFalseWhenParameterIsMissing() {
Queue.Item item = new Queue.WaitingItem(Calendar.getInstance(), project, Collections.emptyList());

assertFalse(strategy.isApplicable(item));
}

@Test
public void isApplicable_returnsFalseWhenParameterIsNotANumber() throws Exception {
public void isApplicable_returnsFalseWhenParameterIsNotANumber() {
StringParameterValue param = new StringParameterValue("priority", "not-a-number");
ParametersAction action = new ParametersAction(param);
Queue.Item item = new Queue.WaitingItem(Calendar.getInstance(), project, Collections.singletonList(action));
Expand Down

0 comments on commit 87900f1

Please sign in to comment.