private ContainerConfig mockContainerConfig(String suffix) { return new ContainerConfig("ContainerConfig.name." + suffix, "ContainerConfig.groupId." + suffix, "ContainerConfig.artifactId." + suffix, "ContainerConfig.version." + suffix); } }
public ContainerConfig getContainerConfig() { return new ContainerConfig(getContainerName(), getGroupId(), getArtifactId(), getVersion()); }
public ContainerConfig getContainerConfig() { return new ContainerConfig(getContainerName(), getGroupId(), getArtifactId(), getVersion()); }
@Test public void testOnAddContainerPopupConfirmed() { List<ContainerConfig> currentElements = new ArrayList<>(); when(dataProvider.getList()).thenReturn(currentElements); //the add container popup is called prepareAndCallPopup(); ContainerConfig returnedConfig = new ContainerConfig(CONTAINER_NAME_VALUE, GROUP_ID_VALUE, ARTIFACT_ID_VALUE, VERSION_VALUE); //the popup was properly completed with a ContainerConfig. okCommandCaptor.getValue().execute(returnedConfig); //the container config was added to the list. assertTrue(currentElements.contains(returnedConfig)); verify(configParamsChangeEvent, times(1)).fire(new ContainerConfigParamsChangeEvent(currentElements)); verify(contentChangeHandler, times(1)).onContentChange(); }
@Test public void testOnAddContainerPopupConfirmed() { List<ContainerConfig> currentElements = new ArrayList<>(); when(dataProvider.getList()).thenReturn(currentElements); //the add container popup is called prepareAndCallPopup(); ContainerConfig returnedConfig = new ContainerConfig(CONTAINER_NAME_VALUE, GROUP_ID_VALUE, ARTIFACT_ID_VALUE, VERSION_VALUE); //the popup was properly completed with a ContainerConfig. okCommandCaptor.getValue().execute(returnedConfig); //the container config was added to the list. assertTrue(currentElements.contains(returnedConfig)); verify(configParamsChangeEvent, times(1)).fire(new ContainerConfigParamsChangeEvent(currentElements)); verify(contentChangeHandler, times(1)).onContentChange(); }