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