Exemple #1
0
        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>());
 }
Exemple #3
0
 public void CountTest()
 {
     Assert.AreEqual(2, GetEnum.Count <Status>());
 }
Exemple #4
0
 public void CountTest()
 {
     Assert.AreEqual(3, GetEnum.Count <GoodTypes>());
 }
 public void CountTest()
 {
     Assert.AreEqual(3, GetEnum.Count <TransactionStatus>());
 }
Exemple #6
0
 [TestMethod] public void NumberOfElementsTest()
 {
     Assert.AreEqual(39, GetEnum.Count <Operation>());
 }
Exemple #7
0
 public void CountTest()
 {
     Assert.AreEqual(2, GetEnum.Count <SortOrder>());
 }
Exemple #8
0
 public void CountTest()
 {
     Assert.AreEqual(10, GetEnum.Count <EventType>());
     Assert.AreEqual(-1, GetEnum.Count <object>());
 }
 public void CountTest()
 {
     Assert.AreEqual(7, GetEnum.Count <RoundingStrategy>());
 }
Exemple #10
0
 [TestMethod] public void CountTestByTypeWrongType()
 => Assert.AreEqual(-1, GetEnum.Count(typeof(int)));
Exemple #11
0
 [TestMethod] public void CountTestWrongType()
 => Assert.AreEqual(-1, GetEnum.Count <string>());
Exemple #12
0
 [TestMethod] public void CountTestByType()
 => Assert.AreEqual(3, GetEnum.Count(typeof(TestEnum)));
Exemple #13
0
 [TestMethod] public void CountTest()
 => Assert.AreEqual(3, GetEnum.Count <TestEnum>());
 public void CountTest()
 {
     Assert.AreEqual(2, GetEnum.Count <ProfileGender>());
 }
Exemple #15
0
 [TestMethod] public void CountTest()
 {
     Assert.AreEqual(4, GetEnum.Count <IsoGender>());
     Assert.AreEqual(-1, GetEnum.Count <object>());
 }
Exemple #16
0
 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>());
 }
Exemple #18
0
 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>());
 }
Exemple #20
0
 public void CountTest()
 {
     Assert.AreEqual(8, GetEnum.Count <ItemCategory>());
 }
Exemple #21
0
 [TestMethod] public void CountTest()
 {
     Assert.AreEqual(5, GetEnum.Count <TelecomDevice>());
 }
Exemple #22
0
 public void CountTest()
 {
     Assert.AreEqual(3, GetEnum.Count <CardType>());
 }
 public void CountTest()
 {
     Assert.AreEqual(4, GetEnum.Count <InsuranceType>());
 }
Exemple #24
0
 public void CountTest()
 {
     Assert.AreEqual(4, GetEnum.Count <IsoGender>());
 }
Exemple #25
0
 public void CountTest()
 {
     Assert.AreEqual(4, GetEnum.Count <InventoryStatus>());
 }