Example #1
0
 [TestMethod] public void ValueByValueTestByTypeWrongType()
 => Assert.AreEqual(0, GetEnum.ValueByValue(typeof(int), 100));
Example #2
0
 [TestMethod] public void ValueByValueTestWrongType()
 => Assert.AreEqual(0, GetEnum.ValueByValue <int>(100));
Example #3
0
 [TestMethod] public void ValueByValueTestByTypeWrongIndex()
 => Assert.AreEqual(TestEnum.Undefined, GetEnum.ValueByValue(typeof(TestEnum), 100));
Example #4
0
 [TestMethod] public void ValueByValueTestWrongIndex()
 => Assert.AreEqual(TestEnum.Undefined, GetEnum.ValueByValue <TestEnum>(100));
Example #5
0
 [TestMethod] public void ValueByValueTestByType()
 => Assert.AreEqual(TestEnum.Second, GetEnum.ValueByValue(typeof(TestEnum), 123));
Example #6
0
 [TestMethod] public void ValueByValueTest()
 => Assert.AreEqual(TestEnum.First, GetEnum.ValueByValue <TestEnum>(1));