Merge branch '2.1.x'

This commit is contained in:
Stephane Nicoll
2019-03-04 09:29:13 +01:00
11 changed files with 59 additions and 36 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -36,6 +36,7 @@ import org.springframework.boot.cli.compiler.dependencies.SpringBootDependencies
import org.springframework.test.util.ReflectionTestUtils;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
/**
* Tests for {@link AetherGrapeEngine}.
@@ -147,13 +148,15 @@ public class AetherGrapeEngineTests {
assertThat(this.groovyClassLoader.getURLs().length).isEqualTo(1);
}
@Test(expected = IllegalArgumentException.class)
@Test
public void differingTypeAndExt() {
Map<String, Object> dependency = createDependency("org.grails",
"grails-dependencies", "2.4.0");
dependency.put("type", "foo");
dependency.put("ext", "bar");
createGrapeEngine().grab(Collections.emptyMap(), dependency);
AetherGrapeEngine grapeEngine = createGrapeEngine();
assertThatIllegalArgumentException()
.isThrownBy(() -> grapeEngine.grab(Collections.emptyMap(), dependency));
}
@Test