Merge pull request #24866 from izeye
* pr/24866: Update copyright of changed file Restore persistOfNullThrowsIllegalArgumentExceptionWithoutExceptionTranslation() Closes gh-24866
This commit is contained in:
commit
e0a3b79bda
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2021 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.stereotype.Repository;
|
|||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
||||
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Tests for {@link PersistenceExceptionTranslationAutoConfiguration}
|
||||
|
|
@ -86,15 +87,12 @@ class PersistenceExceptionTranslationAutoConfigurationTests {
|
|||
assertThat(beans).isEmpty();
|
||||
}
|
||||
|
||||
// @Test
|
||||
// public void
|
||||
// persistOfNullThrowsIllegalArgumentExceptionWithoutExceptionTranslation() {
|
||||
// this.context = new AnnotationConfigApplicationContext(
|
||||
// EmbeddedDataSourceConfiguration.class,
|
||||
// HibernateJpaAutoConfiguration.class, TestConfiguration.class);
|
||||
// assertThatExceptionOfType(IllegalArgumentException.class).isThrownBy(
|
||||
// () -> this.context.getBean(TestRepository.class).doSomething());
|
||||
// }
|
||||
@Test
|
||||
void persistOfNullThrowsIllegalArgumentExceptionWithoutExceptionTranslation() {
|
||||
this.context = new AnnotationConfigApplicationContext(EmbeddedDataSourceConfiguration.class,
|
||||
HibernateJpaAutoConfiguration.class, TestConfiguration.class);
|
||||
assertThatIllegalArgumentException().isThrownBy(() -> this.context.getBean(TestRepository.class).doSomething());
|
||||
}
|
||||
|
||||
@Test
|
||||
void persistOfNullThrowsInvalidDataAccessApiUsageExceptionWithExceptionTranslation() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue