Fetch spring boot version from api.spring.io
This commit is contained in:
@@ -22,10 +22,10 @@ import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Import;
|
||||
import org.springframework.ide.vscode.boot.app.BootJavaConfig;
|
||||
import org.springframework.ide.vscode.boot.app.RestTemplateFactory;
|
||||
import org.springframework.ide.vscode.boot.bootiful.BootLanguageServerTest;
|
||||
import org.springframework.ide.vscode.boot.bootiful.HoverTestConf;
|
||||
import org.springframework.ide.vscode.boot.validation.generations.CachedBootVersionsFromMavenCentral;
|
||||
import org.springframework.ide.vscode.boot.validation.generations.SpringIoProjectsProvider;
|
||||
import org.springframework.ide.vscode.boot.validation.generations.SpringProjectsProvider;
|
||||
import org.springframework.ide.vscode.boot.validation.generations.json.Generation;
|
||||
@@ -45,7 +45,7 @@ public class ProjectGenerationsValidationTest {
|
||||
|
||||
@Autowired private BootLanguageServerHarness harness;
|
||||
@Autowired private RestTemplateFactory restTemplateFactory;
|
||||
@Autowired private CachedBootVersionsFromMavenCentral cachedVersions;
|
||||
@Autowired private BootJavaConfig config;
|
||||
|
||||
private ProjectsHarness projects = ProjectsHarness.INSTANCE;
|
||||
|
||||
@@ -59,7 +59,7 @@ public class ProjectGenerationsValidationTest {
|
||||
|
||||
@Test
|
||||
void testProjectsInfoFromSpringIo() throws Exception {
|
||||
SpringProjectsProvider cache = new SpringIoProjectsProvider("https://api.spring.io/projects", restTemplateFactory, cachedVersions);
|
||||
SpringProjectsProvider cache = new SpringIoProjectsProvider(config, restTemplateFactory);
|
||||
|
||||
SpringProject project = cache.getProject("spring-boot");
|
||||
assertNotNull(project);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2020 Pivotal, Inc.
|
||||
* Copyright (c) 2020, 2023 Pivotal, Inc.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
@@ -34,7 +34,7 @@ public class SampleProjectsProvider implements SpringProjectsProvider {
|
||||
|
||||
@Override
|
||||
public ResolvedSpringProject getProject(String projectSlug) throws Exception {
|
||||
ResolvedSpringProject project = new ResolvedSpringProject(getSpringProject(projectSlug), null, null) {
|
||||
ResolvedSpringProject project = new ResolvedSpringProject(getSpringProject(projectSlug), null) {
|
||||
|
||||
@Override
|
||||
public List<Generation> getGenerations() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user