Ejemplo n.º 1
0
        public static void ToString_InvalidFormat_ThrowsFormatException()
        {
            SimpleEnum e = SimpleEnum.Red;

            Assert.Throws <FormatException>(() => e.ToString("   \t")); // Format is whitepsace
            Assert.Throws <FormatException>(() => e.ToString("y"));     // No such format
        }
Ejemplo n.º 2
0
 public string GetEnum(SimpleEnum id)
 {
     ThrowIfInsideThrowsController();
     return(id.ToString());
 }
 public string GetEnum(SimpleEnum id)
 {
     ThrowIfInsideThrowsController();
     return id.ToString();
 }