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