parent
eaf9deedfd
commit
31b651a114
|
|
@ -357,7 +357,8 @@ public abstract class AbstractPropertyAccessorTests {
|
|||
AbstractPropertyAccessor accessor = createAccessor(target);
|
||||
try {
|
||||
accessor.getPropertyValue("spouse.bla");
|
||||
} catch (NotReadablePropertyException ex) {
|
||||
}
|
||||
catch (NotReadablePropertyException ex) {
|
||||
assertThat(ex.getMessage().contains(TestBean.class.getName())).isTrue();
|
||||
}
|
||||
}
|
||||
|
|
@ -912,12 +913,12 @@ public abstract class AbstractPropertyAccessorTests {
|
|||
accessor.setPropertyValue("intArray", new int[]{4, 5, 2, 3});
|
||||
assertThat(target.intArray.length == 4).as("intArray length = 4").isTrue();
|
||||
assertThat(target.intArray[0] == 4 && target.intArray[1] == 5 &&
|
||||
target.intArray[2] == 2 && target.intArray[3] == 3).as("correct values").isTrue();
|
||||
target.intArray[2] == 2 && target.intArray[3] == 3).as("correct values").isTrue();
|
||||
|
||||
accessor.setPropertyValue("intArray", new String[]{"3", "4", "1", "2"});
|
||||
assertThat(target.intArray.length == 4).as("intArray length = 4").isTrue();
|
||||
assertThat(target.intArray[0] == 4 && target.intArray[1] == 5 &&
|
||||
target.intArray[2] == 2 && target.intArray[3] == 3).as("correct values").isTrue();
|
||||
target.intArray[2] == 2 && target.intArray[3] == 3).as("correct values").isTrue();
|
||||
|
||||
accessor.setPropertyValue("intArray", 1);
|
||||
assertThat(target.intArray.length == 1).as("intArray length = 4").isTrue();
|
||||
|
|
@ -1002,7 +1003,7 @@ public abstract class AbstractPropertyAccessorTests {
|
|||
accessor.setPropertyValue("array[2]", 3);
|
||||
assertThat(target.getArray()).hasSize(3);
|
||||
assertThat(target.getArray()[0] == 1 && target.getArray()[1] == 0 &&
|
||||
target.getArray()[2] == 3).as("correct values").isTrue();
|
||||
target.getArray()[2] == 3).as("correct values").isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -1267,7 +1268,7 @@ public abstract class AbstractPropertyAccessorTests {
|
|||
badValues.add("map[key2]", "");
|
||||
assertThatExceptionOfType(PropertyBatchUpdateException.class).isThrownBy(() ->
|
||||
accessor.setPropertyValues(badValues))
|
||||
.satisfies(ex -> assertThat(ex.getPropertyAccessException("map[key2]")).isInstanceOf(TypeMismatchException.class));
|
||||
.satisfies(ex -> assertThat(ex.getPropertyAccessException("map[key2]")).isInstanceOf(TypeMismatchException.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -1318,7 +1319,7 @@ public abstract class AbstractPropertyAccessorTests {
|
|||
assertThat(((TestBean) target.getMap().get(2)).getName()).isEqualTo("rob");
|
||||
}
|
||||
|
||||
@SuppressWarnings({"unchecked", "rawtypes"}) // must work with raw map in this test
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" }) // must work with raw map in this test
|
||||
@Test
|
||||
public void setRawMapPropertyWithNoEditorRegistered() {
|
||||
IndexedTestBean target = new IndexedTestBean();
|
||||
|
|
|
|||
|
|
@ -16,10 +16,6 @@
|
|||
|
||||
package org.springframework.beans.propertyeditors;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.*;
|
||||
import org.springframework.beans.testfixture.beans.*;
|
||||
|
||||
import java.beans.PropertyEditor;
|
||||
import java.beans.PropertyEditorSupport;
|
||||
import java.beans.PropertyVetoException;
|
||||
|
|
@ -753,7 +749,7 @@ class CustomEditorTests {
|
|||
editor.setAsText(validDate);
|
||||
assertThatIllegalArgumentException().isThrownBy(() ->
|
||||
editor.setAsText(invalidDate))
|
||||
.withMessageContaining("10");
|
||||
.withMessageContaining("10");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ package org.springframework.util;
|
|||
|
||||
import java.io.IOException;
|
||||
import java.sql.SQLException;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ import javax.jms.Session;
|
|||
import javax.jms.TextMessage;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.mockito.invocation.InvocationOnMock;
|
||||
import org.mockito.stubbing.Answer;
|
||||
|
||||
import org.springframework.jms.support.converter.MessageConversionException;
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@ import javax.jms.TextMessage;
|
|||
import com.fasterxml.jackson.annotation.JsonView;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.mockito.invocation.InvocationOnMock;
|
||||
import org.mockito.stubbing.Answer;
|
||||
|
||||
import org.springframework.core.MethodParameter;
|
||||
|
|
|
|||
Loading…
Reference in New Issue