Skip to content

Commit defebe6

Browse files
committed
refactor: 重构代码
1 parent 5b2e42d commit defebe6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/UnitTest/Utils/UtilityTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public void GetSortListFunc_Ok()
114114
[Fact]
115115
public void GetPlaceHolder_Ok()
116116
{
117-
var ph = Utility.GetPlaceHolder(typeof(Foo), "Name");
117+
var ph = Utility.GetPlaceHolder<Foo>("Name");
118118
Assert.Equal("不可为空", ph);
119119

120120
// 动态类型
@@ -353,7 +353,7 @@ public void GetDisplayName_Ok()
353353
dn = Utility.GetDisplayName<TestEnum>(nameof(TestEnum.Address));
354354
Assert.Equal("Test-Enum-Address", dn);
355355

356-
dn = Utility.GetDisplayName(typeof(Nullable<TestEnum>), nameof(TestEnum.Name));
356+
dn = Utility.GetDisplayName<TestEnum?>(nameof(TestEnum.Name));
357357
Assert.Equal("Test-Enum-Name", dn);
358358
}
359359

0 commit comments

Comments
 (0)