From d62b58beb0816f9ff26ffd7a482c4a74ff9e45b4 Mon Sep 17 00:00:00 2001 From: nsingh Date: Thu, 19 Jan 2017 17:04:34 -0800 Subject: [PATCH] Fixed bug in mock CF junits Also enabled CF mock test cases for reconcile that were failing before but now pass due to related fixes. --- .../ide/vscode/manifest/yaml/ManifestYamlEditorCFTest.java | 2 +- .../ide/vscode/manifest/yaml/ManifestYamlEditorTest.java | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/vscode-extensions/vscode-manifest-yaml/src/test/java/org/springframework/ide/vscode/manifest/yaml/ManifestYamlEditorCFTest.java b/vscode-extensions/vscode-manifest-yaml/src/test/java/org/springframework/ide/vscode/manifest/yaml/ManifestYamlEditorCFTest.java index 59e374587..78551b9f2 100644 --- a/vscode-extensions/vscode-manifest-yaml/src/test/java/org/springframework/ide/vscode/manifest/yaml/ManifestYamlEditorCFTest.java +++ b/vscode-extensions/vscode-manifest-yaml/src/test/java/org/springframework/ide/vscode/manifest/yaml/ManifestYamlEditorCFTest.java @@ -21,7 +21,7 @@ public class ManifestYamlEditorCFTest { @Before public void setup() throws Exception { - harness = new LanguageServerHarness(ManifestYamlLanguageServer::new); + harness = new LanguageServerHarness(()-> new ManifestYamlLanguageServer()); harness.intialize(null); } diff --git a/vscode-extensions/vscode-manifest-yaml/src/test/java/org/springframework/ide/vscode/manifest/yaml/ManifestYamlEditorTest.java b/vscode-extensions/vscode-manifest-yaml/src/test/java/org/springframework/ide/vscode/manifest/yaml/ManifestYamlEditorTest.java index 4da171cda..dd13460c3 100644 --- a/vscode-extensions/vscode-manifest-yaml/src/test/java/org/springframework/ide/vscode/manifest/yaml/ManifestYamlEditorTest.java +++ b/vscode-extensions/vscode-manifest-yaml/src/test/java/org/springframework/ide/vscode/manifest/yaml/ManifestYamlEditorTest.java @@ -17,10 +17,8 @@ import static org.mockito.Mockito.*; import java.io.IOException; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; import org.springframework.ide.vscode.commons.cloudfoundry.client.ClientRequests; -import org.springframework.ide.vscode.commons.cloudfoundry.client.CloudFoundryClientFactory; import org.springframework.ide.vscode.languageserver.testharness.Editor; import org.springframework.ide.vscode.languageserver.testharness.LanguageServerHarness; @@ -30,7 +28,7 @@ public class ManifestYamlEditorTest { MockCloudfoundry cfClientFactory = new MockCloudfoundry(); @Before public void setup() throws Exception { - harness = new LanguageServerHarness(ManifestYamlLanguageServer::new); + harness = new LanguageServerHarness(()-> new ManifestYamlLanguageServer(cfClientFactory)); harness.intialize(null); } @@ -684,7 +682,6 @@ public class ManifestYamlEditorTest { } @Test - @Ignore public void noReconcileErrorsWhenCFFactoryThrows() throws Exception { cfClientFactory.throwException(new IOException("Can't create a client!")); Editor editor = harness.newEditor( @@ -699,7 +696,6 @@ public class ManifestYamlEditorTest { } @Test - @Ignore public void noReconcileErrorsWhenClientThrows() throws Exception { ClientRequests cfClient = cfClientFactory.client; when(cfClient.getBuildpacks()).thenThrow(new IOException("Can't get buildpacks"));