Exemple #1
0
        public void GetDescription_ShouldBe_太胖()
        {
            var actual = MyExtensions.GetEnumDescription(BmiResult.Fat);

            var expected = "太胖";

            Assert.AreEqual(actual, expected);
        }
Exemple #2
0
 protected void SetBmiResult()
 {
     Result = (Bmi > this._upper)
         ? MyExtensions.GetEnumDescription(BmiResult.Fat)
         : (Bmi > this._lower)
             ? MyExtensions.GetEnumDescription(BmiResult.Just)
             : MyExtensions.GetEnumDescription(BmiResult.Thin);
 }
Exemple #3
0
        public void GetDescription_ShouldBe_Exception()
        {
            var actual = MyExtensions.GetEnumDescription(Test.item1);

            string expected = null;

            Assert.AreEqual(expected, actual);
        }