Search in sources :

Example 1 with QualityControlAutoVetter

use of au.gov.asd.tac.constellation.views.qualitycontrol.daemon.QualityControlAutoVetter in project constellation by constellation-app.

the class DataAccessViewTopComponentNGTest method handleComponentOpened.

@Test(enabled = false)
public void handleComponentOpened() {
    final DataAccessPane dataAccessPane = mock(DataAccessPane.class);
    final DataAccessViewTopComponent spiedTopComponent = spy(dataAccessViewTopComponent);
    doReturn(dataAccessPane).when(spiedTopComponent).getDataAccessPane();
    try (final MockedStatic<QualityControlAutoVetter> qualityControlAutoVetterMockedStatic = Mockito.mockStatic(QualityControlAutoVetter.class)) {
        final QualityControlAutoVetter instance = mock(QualityControlAutoVetter.class);
        qualityControlAutoVetterMockedStatic.when(QualityControlAutoVetter::getInstance).thenReturn(instance);
        spiedTopComponent.handleComponentOpened();
        verify(instance).addObserver(dataAccessPane);
    }
}
Also used : QualityControlAutoVetter(au.gov.asd.tac.constellation.views.qualitycontrol.daemon.QualityControlAutoVetter) DataAccessPane(au.gov.asd.tac.constellation.views.dataaccess.panes.DataAccessPane) Test(org.testng.annotations.Test)

Example 2 with QualityControlAutoVetter

use of au.gov.asd.tac.constellation.views.qualitycontrol.daemon.QualityControlAutoVetter in project constellation by constellation-app.

the class DataAccessViewTopComponentNGTest method handleComponentClosed.

@Test(enabled = false)
public void handleComponentClosed() {
    final DataAccessPane dataAccessPane = mock(DataAccessPane.class);
    final DataAccessViewTopComponent spiedTopComponent = spy(dataAccessViewTopComponent);
    doReturn(dataAccessPane).when(spiedTopComponent).getDataAccessPane();
    try (final MockedStatic<QualityControlAutoVetter> qualityControlAutoVetterMockedStatic = Mockito.mockStatic(QualityControlAutoVetter.class)) {
        final QualityControlAutoVetter instance = mock(QualityControlAutoVetter.class);
        qualityControlAutoVetterMockedStatic.when(QualityControlAutoVetter::getInstance).thenReturn(instance);
        spiedTopComponent.handleComponentClosed();
        verify(instance).removeObserver(dataAccessPane);
    }
}
Also used : QualityControlAutoVetter(au.gov.asd.tac.constellation.views.qualitycontrol.daemon.QualityControlAutoVetter) DataAccessPane(au.gov.asd.tac.constellation.views.dataaccess.panes.DataAccessPane) Test(org.testng.annotations.Test)

Aggregations

DataAccessPane (au.gov.asd.tac.constellation.views.dataaccess.panes.DataAccessPane)2 QualityControlAutoVetter (au.gov.asd.tac.constellation.views.qualitycontrol.daemon.QualityControlAutoVetter)2 Test (org.testng.annotations.Test)2