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 }
public string GetEnum(SimpleEnum id) { ThrowIfInsideThrowsController(); return(id.ToString()); }
public string GetEnum(SimpleEnum id) { ThrowIfInsideThrowsController(); return id.ToString(); }