Skip to content

Commit

Permalink
#332 Remove needlessly declared IOExceptions and assigned value
Browse files Browse the repository at this point in the history
  • Loading branch information
prmr committed Nov 17, 2020
1 parent 5f8cbfe commit 9e1e2d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion test/ca/mcgill/cs/jetuml/gui/tips/TestTipDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ public void testGetTipElementAsNodeHandlesAllMedia()
// image name, but the other media (Text) don't have such requirements, so we can
// use tip1.png as the content for all tips.

Node node = getTipElementAsNode(aTipDialog, tipElement, parent);
// This is a crash test for this method, the return value does not matter
getTipElementAsNode(aTipDialog, tipElement, parent);
}
}

Expand Down
5 changes: 2 additions & 3 deletions test/ca/mcgill/cs/jetuml/gui/tips/TestTipJsons.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import static org.junit.jupiter.api.Assertions.fail;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.lang.reflect.Field;
Expand Down Expand Up @@ -39,15 +38,15 @@ public static void setupClass() throws NoSuchFieldException, SecurityException,
}

@Test
public void testTipJsons_testCorrectNumberOfTips() throws IOException, URISyntaxException
public void testTipJsons_testCorrectNumberOfTips() throws URISyntaxException
{
File dir = getTipJsonsDirectoryAsFile();
int numTipFiles = dir.listFiles().length;
assertEquals(NUM_TIPS, numTipFiles);
}

@Test
public void testTipJsons_atLeastTwoTips() throws IOException, URISyntaxException
public void testTipJsons_atLeastTwoTips() throws URISyntaxException
{
File dir = getTipJsonsDirectoryAsFile();
int numTipFiles = dir.listFiles().length;
Expand Down

0 comments on commit 9e1e2d6

Please sign in to comment.