Skip to content

Commit

Permalink
Minor changes to TestPDETemplates
Browse files Browse the repository at this point in the history
* Stop using assertThat(message, variable equalTo(constant). It's just
complicated way to write assertEquals(message, constant, variable) which
even calls out to yet another library.
* Remove needless throws declaration.

Seen while investigating #55

Change-Id: If4b7a6937a9ec9acac88e435c21c52f7e7e6f1d8
  • Loading branch information
akurtakov committed Apr 29, 2022
1 parent 96d307b commit 9990ef8
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@
package org.eclipse.pde.ui.templates.tests;

import static java.util.stream.Collectors.toSet;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.IsEqual.equalTo;
import static org.junit.Assert.assertEquals;

import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.util.*;
import java.util.stream.Collectors;
Expand Down Expand Up @@ -65,7 +63,7 @@ public void execute(IProgressMonitor monitor)
}

@BeforeClass
public static void setTargetPlatform() throws IOException, CoreException, InterruptedException {
public static void setTargetPlatform() throws CoreException, InterruptedException {
TargetPlatformUtil.setRunningPlatformAsTarget();
}

Expand Down Expand Up @@ -166,7 +164,7 @@ public void configureProjectAndCheckMarkers() throws CoreException {
markers = new IMarker[0];
}

assertThat("Template '" + template.getLabel() + "' generates errors.", markers, equalTo(new IMarker[0]));
assertEquals("Template '" + template.getLabel() + "' generates errors.", 0, markers.length);
}

@Test
Expand Down

0 comments on commit 9990ef8

Please sign in to comment.