public void IntOperator() { int enumValue = (int)EKinds.StageOne; EKinds kind = (EKinds)enumValue; Assert.AreEqual(kind, EKinds.StageOne); }
public void TryParse() { bool match = EKinds.TryParse("StageOne", out EKinds matchValue); bool noMatch = EKinds.TryParse("stageThree", out EKinds noMatchValue); Assert.IsTrue(match); Assert.AreEqual(EKinds.StageOne, matchValue); Assert.IsFalse(noMatch); Assert.AreEqual(EKinds.Default, noMatchValue); }