use of au.gov.asd.tac.constellation.views.find2.FindViewTopComponent in project constellation by constellation-app.
the class FindViewControllerNGTest method testGetCurrentBasicFindParameters.
/**
* Test of getCurrentBasicFindParameters method, of class
* FindViewController.
*/
@Test
public void testGetCurrentBasicFindParameters() {
System.out.println("getCurrentBasicFindParameters");
final FindViewTopComponent findViewTopComponent = mock(FindViewTopComponent.class);
FindViewController instance = FindViewController.getDefault().init(findViewTopComponent);
/**
* Check getting getCurrentBasicReplaceParamters returns the default
* parameters
*/
BasicFindReplaceParameters defaultParameters = new BasicFindReplaceParameters();
instance.updateBasicFindParameters(defaultParameters);
assertEquals(instance.getCurrentBasicFindParameters(), defaultParameters);
/**
* Check getting getCurrentBasicReplaceParamters returns the matching
* parameters of what it was set to
*/
instance.updateBasicFindParameters(parameters);
assertEquals(instance.getCurrentBasicFindParameters(), parameters);
}
use of au.gov.asd.tac.constellation.views.find2.FindViewTopComponent in project constellation by constellation-app.
the class FindViewControllerNGTest method testGetCurrentBasicReplaceParameters.
/**
* Test of getCurrentBasicReplaceParameters method, of class
* FindViewController.
*/
@Test
public void testGetCurrentBasicReplaceParameters() {
System.out.println("getCurrentBasicReplaceParameters");
final FindViewTopComponent findViewTopComponent = mock(FindViewTopComponent.class);
FindViewController instance = FindViewController.getDefault().init(findViewTopComponent);
// Check getting getCurrentBasicReplaceParamters returns the default
// when it has not been set
BasicFindReplaceParameters defaultParameters = new BasicFindReplaceParameters();
instance.updateBasicReplaceParameters(defaultParameters);
assertEquals(instance.getCurrentBasicReplaceParameters(), defaultParameters);
// Check getting getCurrentBasicReplaceParamters returns the parameters it has been set to
// it has been set to when it has not been set
instance.updateBasicReplaceParameters(parameters2);
assertEquals(instance.getCurrentBasicReplaceParameters(), parameters2);
}
use of au.gov.asd.tac.constellation.views.find2.FindViewTopComponent in project constellation by constellation-app.
the class ColourCriteriaPanelNGTest method setUpMethod.
@BeforeMethod
public void setUpMethod() throws Exception {
findViewTopComponent = mock(FindViewTopComponent.class);
spyTopComponent = spy(findViewTopComponent);
findViewPane = mock(FindViewPane.class);
findViewTabs = mock(FindViewTabs.class);
FindViewController.getDefault();
basicFindTab = mock(BasicFindTab.class);
replaceTab = mock(ReplaceTab.class);
when(findViewTabs.getParentComponent()).thenReturn(findViewPane);
when(findViewPane.getTabs()).thenReturn(findViewTabs);
when(findViewTabs.getBasicFindTab()).thenReturn(basicFindTab);
when(findViewTabs.getReplaceTab()).thenReturn(replaceTab);
when(findViewTabs.getAdvancedFindTab()).thenReturn(advancedTab);
advancedTab = new AdvancedFindTab(findViewTabs);
}
Aggregations