public void ToEnum_Passing_Invalid_Int_Name_Enumeracion_Returns_Null() { var value = new Random().Next(); LogTypeEnum?expected = null; var actual = LogTypeEnum.ToEnum(value); Assert.AreEqual(expected, actual); }
public void ToEnum_Passing_Invalid_String_Name_Enumeracion_Returns_Null() { var name = Guid.NewGuid().ToString(); LogTypeEnum?expected = null; var actual = LogTypeEnum.ToEnum(name); Assert.AreEqual(expected, actual); }
public void ToEnum_Passing_Valid_IntName_Enumeracion_Returns_Enumeracion() { var value = 2; var expected = LogTypeEnum.Created; var actual = LogTypeEnum.ToEnum(value); Assert.AreEqual(expected, actual); }
public void ToEnum_Passing_Valid_String_Name_Enumeracion_Returns_Enumeracion() { var name = "Changed"; var expected = LogTypeEnum.Changed; var actual = LogTypeEnum.ToEnum(name); Assert.AreEqual(expected, actual); }