public static object Enum(Type t) { var count = GetEnum.Count(t); var index = Int32(0, count); return(GetEnum.Value(t, index)); }
public void CountTest() { Assert.AreEqual(1, GetEnum.Count <PricingStrategy>()); }
public void CountTest() { Assert.AreEqual(2, GetEnum.Count <Status>()); }
public void CountTest() { Assert.AreEqual(3, GetEnum.Count <GoodTypes>()); }
public void CountTest() { Assert.AreEqual(3, GetEnum.Count <TransactionStatus>()); }
[TestMethod] public void NumberOfElementsTest() { Assert.AreEqual(39, GetEnum.Count <Operation>()); }
public void CountTest() { Assert.AreEqual(2, GetEnum.Count <SortOrder>()); }
public void CountTest() { Assert.AreEqual(10, GetEnum.Count <EventType>()); Assert.AreEqual(-1, GetEnum.Count <object>()); }
public void CountTest() { Assert.AreEqual(7, GetEnum.Count <RoundingStrategy>()); }
[TestMethod] public void CountTestByTypeWrongType() => Assert.AreEqual(-1, GetEnum.Count(typeof(int)));
[TestMethod] public void CountTestWrongType() => Assert.AreEqual(-1, GetEnum.Count <string>());
[TestMethod] public void CountTestByType() => Assert.AreEqual(3, GetEnum.Count(typeof(TestEnum)));
[TestMethod] public void CountTest() => Assert.AreEqual(3, GetEnum.Count <TestEnum>());
public void CountTest() { Assert.AreEqual(2, GetEnum.Count <ProfileGender>()); }
[TestMethod] public void CountTest() { Assert.AreEqual(4, GetEnum.Count <IsoGender>()); Assert.AreEqual(-1, GetEnum.Count <object>()); }
public void CountByTypeTest() { Assert.AreEqual(4, GetEnum.Count(typeof(IsoGender))); Assert.AreEqual(-1, GetEnum.Count(typeof(object))); }
public void CountTest() { Assert.AreEqual(7, GetEnum.Count <MoneyOperation>()); }
public void CountByTypeTest() { Assert.AreEqual(10, GetEnum.Count(typeof(EventType))); Assert.AreEqual(-1, GetEnum.Count(typeof(object))); }
[TestMethod] public void CountTest() { Assert.AreEqual(6, GetEnum.Count <PartyNameType>()); }
public void CountTest() { Assert.AreEqual(8, GetEnum.Count <ItemCategory>()); }
[TestMethod] public void CountTest() { Assert.AreEqual(5, GetEnum.Count <TelecomDevice>()); }
public void CountTest() { Assert.AreEqual(3, GetEnum.Count <CardType>()); }
public void CountTest() { Assert.AreEqual(4, GetEnum.Count <InsuranceType>()); }
public void CountTest() { Assert.AreEqual(4, GetEnum.Count <IsoGender>()); }
public void CountTest() { Assert.AreEqual(4, GetEnum.Count <InventoryStatus>()); }