示例#1
0
 public void GetDescription_InvalidValue_ReturnEmpty()
 {
     Assert.AreEqual(string.Empty, Enum.GetDescription <LogLevel>(100));
 }
示例#2
0
 public void GetDescription_InvalidEnum_ReturnEmpty()
 {
     Assert.AreEqual(string.Empty, Enum.GetDescription <string>(DebugValue));
 }
示例#3
0
 public void GetDescription_InvalidName_ReturnEmpty()
 {
     Assert.AreEqual(string.Empty, Enum.GetDescription <LogLevel>("Debug1"));
 }
示例#4
0
 public void GetDescription_Name_Nullable()
 {
     Assert.AreEqual(DebugDescription, Enum.GetDescription <LogLevel?>(DebugName));
 }
示例#5
0
 public void GetDescription_Instance()
 {
     Assert.AreEqual(DebugDescription, Enum.GetDescription <LogLevel>(DebugInstance));
 }
示例#6
0
 public void GetDescription_Value()
 {
     Assert.AreEqual(DebugDescription, Enum.GetDescription <LogLevel>(DebugValue));
 }
示例#7
0
 public void GetDescription_ArgumentIsEmpty_ReturnEmpty()
 {
     Assert.AreEqual(string.Empty, Enum.GetDescription <LogLevel>(string.Empty));
 }