|
1 | 1 | /******************************************************************************* |
2 | | - * Copyright (c) 2015, 2018 Pivotal Software, Inc. |
| 2 | + * Copyright (c) 2015, 2022 Pivotal Software, Inc. |
3 | 3 | * All rights reserved. This program and the accompanying materials |
4 | 4 | * are made available under the terms of the Eclipse Public License v1.0 |
5 | 5 | * which accompanies this distribution, and is available at |
|
16 | 16 | import java.net.URL; |
17 | 17 | import java.time.Duration; |
18 | 18 | import java.util.ArrayList; |
19 | | -import java.util.Arrays; |
20 | 19 | import java.util.List; |
21 | 20 | import java.util.Properties; |
22 | 21 | import java.util.function.Predicate; |
23 | 22 |
|
24 | | -import javax.xml.transform.stream.StreamResult; |
25 | | - |
26 | 23 | import org.apache.commons.io.FileUtils; |
27 | 24 | import org.apache.commons.lang3.StringUtils; |
28 | 25 | import org.apache.commons.lang3.tuple.Pair; |
|
41 | 38 | import org.springframework.ide.eclipse.boot.launch.process.BootProcessFactory; |
42 | 39 | import org.springframework.ide.eclipse.boot.test.util.LaunchResult; |
43 | 40 | import org.springframework.ide.eclipse.boot.test.util.LaunchUtil; |
44 | | -import org.springsource.ide.eclipse.commons.frameworks.test.util.ACondition; |
45 | 41 | import org.springsource.ide.eclipse.commons.frameworks.test.util.Timewatch; |
46 | 42 | import org.springsource.ide.eclipse.commons.tests.util.StsTestUtil; |
47 | 43 |
|
@@ -166,6 +162,21 @@ public void testSetGetFastStartup() throws Exception { |
166 | 162 | assertEquals(false, BootLaunchConfigurationDelegate.getFastStartup(wc)); |
167 | 163 | } |
168 | 164 |
|
| 165 | + public void testSetGetAutoConnect() throws Exception { |
| 166 | + ILaunchConfigurationWorkingCopy wc = createWorkingCopy(); |
| 167 | + assertEquals(true, BootLaunchConfigurationDelegate.getAutoConnect(wc)); |
| 168 | + |
| 169 | + BootLaunchConfigurationDelegate.setAutoConnect(wc, false); |
| 170 | + assertEquals(false, BootLaunchConfigurationDelegate.getAutoConnect(wc)); |
| 171 | + |
| 172 | + IProject project = createLaunchReadyProject(TEST_PROJECT); |
| 173 | + |
| 174 | + //Creates a launch conf similar to that created by 'Run As' menu. |
| 175 | + wc = createWorkingCopy(); |
| 176 | + BootLaunchConfigurationDelegate.setDefaults(wc, project, TEST_MAIN_CLASS); |
| 177 | + assertEquals(true, BootLaunchConfigurationDelegate.getAutoConnect(wc)); |
| 178 | + } |
| 179 | + |
169 | 180 | public void testClearProperties() throws Exception { |
170 | 181 | ILaunchConfigurationWorkingCopy wc = createWorkingCopy(); |
171 | 182 | BootLaunchConfigurationDelegate.setRawApplicationProperties(wc, |
|
0 commit comments