Updated to C# 12
This commit is contained in:
@@ -108,22 +108,6 @@ namespace UnitTests.Common.Extensions
|
||||
Assert.IsFalse(list.Any());
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void ShouldReturnDisplayNameOrStringRepresentation()
|
||||
{
|
||||
// arrange
|
||||
var enumWithDisplayName = TestEnum.Two;
|
||||
var enumWithoutDisplayName = TestEnum.Zero;
|
||||
|
||||
// act
|
||||
string displayName = enumWithDisplayName.GetDisplayName();
|
||||
string noDisplayName = enumWithoutDisplayName.GetDisplayName();
|
||||
|
||||
// assert
|
||||
Assert.AreEqual("Zwei", displayName);
|
||||
Assert.AreEqual(enumWithoutDisplayName.ToString(), noDisplayName);
|
||||
}
|
||||
|
||||
internal enum TestEnum
|
||||
{
|
||||
[CustomMultiple("nix")]
|
||||
@@ -132,7 +116,6 @@ namespace UnitTests.Common.Extensions
|
||||
Zero,
|
||||
[Description("Eins")]
|
||||
One,
|
||||
[Display(Name = "Zwei")]
|
||||
Two,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user