Skip to content

Commit 140e1e6

Browse files
committed
Polish PropertyAccessorUtilsTests
1 parent 39de64b commit 140e1e6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

spring-beans/src/test/java/org/springframework/beans/PropertyAccessorUtilsTests.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,20 @@
1616

1717
package org.springframework.beans;
1818

19-
import java.util.Arrays;
20-
2119
import org.junit.Test;
2220

2321
import static org.assertj.core.api.Assertions.assertThat;
2422

2523
/**
24+
* Unit tests for {@link PropertyAccessorUtils}.
25+
*
2626
* @author Juergen Hoeller
2727
* @author Chris Beams
2828
*/
2929
public class PropertyAccessorUtilsTests {
3030

3131
@Test
32-
public void testCanonicalPropertyName() {
32+
public void canonicalPropertyName() {
3333
assertThat(PropertyAccessorUtils.canonicalPropertyName("map")).isEqualTo("map");
3434
assertThat(PropertyAccessorUtils.canonicalPropertyName("map[key1]")).isEqualTo("map[key1]");
3535
assertThat(PropertyAccessorUtils.canonicalPropertyName("map['key1']")).isEqualTo("map[key1]");
@@ -42,15 +42,15 @@ public void testCanonicalPropertyName() {
4242
}
4343

4444
@Test
45-
public void testCanonicalPropertyNames() {
45+
public void canonicalPropertyNames() {
4646
String[] original =
4747
new String[] {"map", "map[key1]", "map['key1']", "map[\"key1\"]", "map[key1][key2]",
4848
"map['key1'][\"key2\"]", "map[key1].name", "map['key1'].name", "map[\"key1\"].name"};
4949
String[] canonical =
5050
new String[] {"map", "map[key1]", "map[key1]", "map[key1]", "map[key1][key2]",
5151
"map[key1][key2]", "map[key1].name", "map[key1].name", "map[key1].name"};
5252

53-
assertThat(Arrays.equals(canonical, PropertyAccessorUtils.canonicalPropertyNames(original))).isTrue();
53+
assertThat(PropertyAccessorUtils.canonicalPropertyNames(original)).isEqualTo(canonical);
5454
}
5555

5656
}

0 commit comments

Comments
 (0)