public void GetDescription_ShouldBe_太胖() { var actual = MyExtensions.GetEnumDescription(BmiResult.Fat); var expected = "太胖"; Assert.AreEqual(actual, expected); }
protected void SetBmiResult() { Result = (Bmi > this._upper) ? MyExtensions.GetEnumDescription(BmiResult.Fat) : (Bmi > this._lower) ? MyExtensions.GetEnumDescription(BmiResult.Just) : MyExtensions.GetEnumDescription(BmiResult.Thin); }
public void GetDescription_ShouldBe_Exception() { var actual = MyExtensions.GetEnumDescription(Test.item1); string expected = null; Assert.AreEqual(expected, actual); }