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