public void Issue598_EnumsWithRepeatedValuesAsText() { var info = EnumCache.GetInfo <TestEnumWithRepeatsAsText> (); Assert.IsTrue(info.IsEnum); Assert.IsTrue(info.StoreAsText); }
public void ShouldReturnTrueForByteEnumStoreAsInt() { var info = EnumCache.GetInfo <TestByteEnumStoreAsInt>(); Assert.IsTrue(info.IsEnum); Assert.IsFalse(info.StoreAsText); }
public void ShouldReturnFalseForClass() { var info = EnumCache.GetInfo <TestClassThusNotEnum>(); Assert.IsFalse(info.IsEnum); Assert.IsFalse(info.StoreAsText); }
public void ShouldReturnTrueForEnumStoreAsInt() { var info = EnumCache.GetInfo <TestEnumStoreAsInt>(); Assert.IsTrue(info.IsEnum); Assert.IsFalse(info.StoreAsText); Assert.IsNull(info.EnumValues); }
public void Issue598_EnumsWithRepeatedValues() { var info = EnumCache.GetInfo <TestEnumWithRepeats> (); Assert.IsTrue(info.IsEnum); Assert.IsFalse(info.StoreAsText); Assert.IsNull(info.EnumValues); }
public void ShouldReturnTrueForEnumStoreAsText() { var info = EnumCache.GetInfo <TestEnumStoreAsText>(); Assert.IsTrue(info.IsEnum); Assert.IsTrue(info.StoreAsText); var values = Enum.GetValues(typeof(TestEnumStoreAsText)).Cast <object>().ToList(); for (int i = 0; i < values.Count; i++) { Assert.AreEqual(values[i].ToString(), info.GetEnumFromInt32Value(i)); } }
public void ShouldReturnTrueForByteEnumStoreAsInt() { var info = EnumCache.GetInfo <TestByteEnumStoreAsInt>(); Assert.IsTrue(info.IsEnum); Assert.IsFalse(info.StoreAsText); Assert.IsNotNull(info.EnumValues); var values = Enum.GetValues(typeof(TestByteEnumStoreAsInt)).Cast <object>().Select(x => Convert.ToInt32(x)).ToList(); for (int i = 0; i < values.Count; i++) { Assert.AreEqual(values[i].ToString(), info.EnumValues[i]); } }