package jalview.ws2.actions.alignment;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.contains;
+import static org.hamcrest.Matchers.hasProperty;
+import static org.hamcrest.Matchers.is;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyList;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.doAnswer;
+import static org.mockito.Mockito.doThrow;
+import static org.mockito.Mockito.inOrder;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
import java.io.IOException;
import java.net.URL;
import java.util.List;
import javax.help.UnsupportedOperationException;
-import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
import org.hamcrest.Matcher;
import org.hamcrest.TypeSafeMatcher;
import org.testng.annotations.Test;
import jalview.datamodel.Alignment;
-import jalview.datamodel.AlignmentI;
import jalview.datamodel.Sequence;
import jalview.datamodel.SequenceI;
import jalview.gui.AlignViewport;
import jalview.viewmodel.AlignmentViewport;
import jalview.ws.params.ParamDatastoreI;
-import jalview.ws2.actions.api.JobI;
import jalview.ws2.actions.api.TaskEventListener;
import jalview.ws2.api.Credentials;
import jalview.ws2.api.JobStatus;
import jalview.ws2.api.WebServiceJobHandle;
import jalview.ws2.client.api.AlignmentWebServiceClientI;
-import org.mockito.hamcrest.MockitoHamcrest;
-import org.mockito.internal.hamcrest.HamcrestArgumentMatcher;
-
-import static org.mockito.Mockito.*;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.*;
-
public class AlignmentActionTest
{
protected AlignmentWebServiceClientI mockClient;
protected WebServiceJobHandle jobRef;
- @BeforeMethod
+ @BeforeMethod(alwaysRun = true)
public void setupMockClient() throws IOException
{
jobRef = new WebServiceJobHandle(
doThrow(new UnsupportedOperationException()).when(mockClient).cancel(any());
}
- @BeforeMethod(dependsOnMethods = { "setupMockClient" })
+ @BeforeMethod(alwaysRun = true, dependsOnMethods = { "setupMockClient" })
public void setupActionBuilder() throws IOException
{
actionBuilder = AlignmentAction.newBuilder(mockClient);
{
private AlignViewport viewport;
- @BeforeMethod
+ @BeforeMethod(alwaysRun = true)
public void setupViewport()
{
viewport = new AlignViewport(new Alignment(new SequenceI[] {
package jalview.ws2.client.slivka;
import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.*;
+import static org.hamcrest.Matchers.allOf;
+import static org.hamcrest.Matchers.contains;
+import static org.hamcrest.Matchers.equalTo;
+import static org.hamcrest.Matchers.hasProperty;
+import static org.hamcrest.Matchers.hasSize;
+import static org.hamcrest.Matchers.instanceOf;
+import static org.hamcrest.Matchers.is;
+import static org.hamcrest.Matchers.nullValue;
+import static org.hamcrest.Matchers.typeCompatibleWith;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
Console.initLogger();
}
- @BeforeMethod
+ @BeforeMethod(alwaysRun = true)
public void setupDiscoverer() throws IOException
{
clientMock = mock(SlivkaClient.class);