File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
spring-core/src/test/java/org/springframework/core Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -60,4 +60,28 @@ void aliasChainingWithMultipleAliases() {
60
60
assertThat (registry .hasAlias ("real_name" , "alias_c" )).isTrue ();
61
61
}
62
62
63
+ @ Test
64
+ void removeAliasTest () {
65
+ SimpleAliasRegistry registry = new SimpleAliasRegistry ();
66
+ registry .registerAlias ("realname" , "nickname" );
67
+ assertThat (registry .hasAlias ("realname" , "nickname" )).isTrue ();
68
+
69
+ registry .removeAlias ("nickname" );
70
+ assertThat (registry .hasAlias ("realname" , "nickname" )).isFalse ();
71
+ }
72
+
73
+ @ Test
74
+ void isAliasTest () {
75
+ SimpleAliasRegistry registry = new SimpleAliasRegistry ();
76
+ registry .registerAlias ("realname" , "nickname" );
77
+ assertThat (registry .isAlias ("nickname" )).isTrue ();
78
+ assertThat (registry .isAlias ("fake" )).isFalse ();
79
+ }
80
+
81
+ @ Test
82
+ void getAliasesTest () {
83
+ SimpleAliasRegistry registry = new SimpleAliasRegistry ();
84
+ registry .registerAlias ("realname" , "nickname" );
85
+ assertThat (registry .getAliases ("realname" ));
86
+ }
63
87
}
You can’t perform that action at this time.
0 commit comments