public void Model_Converter_StringEnumConverter_Convert_Enum_Should_Pass() { var myConverter = new StringEnumConverter(); var myObject = ItemLocationEnum.Feet; var Result = myConverter.Convert(myObject, null, null, null); var Expected = 40; Assert.AreEqual(Expected, Result, TestContext.CurrentContext.Test.Name); }
public void Model_Converter_StringEnumConverter_Convert_Other_Should_Skip() { var myConverter = new StringEnumConverter(); var myObject = new Item(); var Result = myConverter.Convert(myObject, null, null, null); var Expected = 0; Assert.AreEqual(Expected, Result, TestContext.CurrentContext.Test.Name); }
public void StringEnumConvert_String_Should_Pass() { var myConverter = new StringEnumConverter(); var myObject = "Feet"; var Result = myConverter.Convert(myObject, typeof(ItemLocationEnum), null, null); var Expected = ItemLocationEnum.Feet; Assert.AreEqual(Expected, Result, TestContext.CurrentContext.Test.Name); }