Skip to content

Commit

Permalink
OS-538: corrected the test assertion calls to support JUnit 5;
Browse files Browse the repository at this point in the history
Added the "final" keyword to the token.
  • Loading branch information
Vest committed Aug 28, 2023
1 parent cb322fd commit 1e363a8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions code/src/test/plugin/exporttokens/PortraitTokenTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
public class PortraitTokenTest extends AbstractCharacterTestCase
{

private PortraitToken portraitToken = new PortraitToken();
private final PortraitToken portraitToken = new PortraitToken();

/**
* Check the generation of a thumbnail file for valid, no scaling conditions.
Expand All @@ -59,8 +59,8 @@ public void testThumb() throws Exception
pc.setPortraitPath("code/src/resources/pcgen/images/SplashPcgen_Alpha.png");
pc.setPortraitThumbnailRect(new Rectangle(160, 70, Constants.THUMBNAIL_SIZE, Constants.THUMBNAIL_SIZE));
String thumbResult = portraitToken.getToken("PORTRAIT.THUMB", pc, null);
assertNotNull("THUMB should not be null ", thumbResult);
assertNotSame("Thumb should not be portrait", pc.getDisplay().getPortraitPath(), thumbResult);
assertNotNull(thumbResult, "THUMB should not be null ");
assertNotSame(pc.getDisplay().getPortraitPath(), thumbResult, "Thumb should not be portrait");
File thumbFile = new File(thumbResult);
assertTrue(thumbFile.exists(), "File should exist");
BufferedImage image = ImageIO.read(thumbFile);
Expand All @@ -79,8 +79,8 @@ public void testThumbScaling() throws Exception
pc.setPortraitPath("code/src/resources/pcgen/images/SplashPcgen_Alpha.png");
pc.setPortraitThumbnailRect(new Rectangle(160, 70, 140, 140));
String thumbResult = portraitToken.getToken("PORTRAIT.THUMB", pc, null);
assertNotNull("THUMB should not be null", thumbResult);
assertNotSame("Thumb should not be portrait", pc.getDisplay().getPortraitPath(), thumbResult);
assertNotNull(thumbResult, "THUMB should not be null");
assertNotSame(pc.getDisplay().getPortraitPath(), thumbResult, "Thumb should not be portrait");
File thumbFile = new File(thumbResult);
assertTrue(thumbFile.exists(), "File should exist");
BufferedImage image = ImageIO.read(thumbFile);
Expand Down

0 comments on commit 1e363a8

Please sign in to comment.