Merge branch '2.1.x'

This commit is contained in:
Andy Wilkinson
2019-02-04 12:36:33 +00:00
26 changed files with 263 additions and 427 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2018 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.
@@ -28,7 +28,7 @@ import org.springframework.boot.cli.command.grab.GrabCommand;
import org.springframework.util.FileSystemUtils;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.Assert.fail;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
/**
* Integration tests for {@link GrabCommand}
@@ -67,14 +67,10 @@ public class GrabCommandIntegrationTests {
@Test
public void duplicateDependencyManagementBomAnnotationsProducesAnError() {
try {
this.cli.grab("duplicateDependencyManagementBom.groovy");
fail();
}
catch (Exception ex) {
assertThat(ex.getMessage())
.contains("Duplicate @DependencyManagementBom annotation");
}
assertThatExceptionOfType(Exception.class)
.isThrownBy(
() -> this.cli.grab("duplicateDependencyManagementBom.groovy"))
.withMessageContaining("Duplicate @DependencyManagementBom annotation");
}
@Test