Exemple #1
0
        public void SetSugarLevelTest()
        {
            Sugar sugarTest = new Sugar();

            sugarTest.SetSugarLevel("半糖");
            Assert.AreEqual(sugarTest.level, "半糖");
            sugarTest.SetSugarLevel("hggg");
            Assert.AreEqual(sugarTest.level, "");
        }
Exemple #2
0
        public void IsNoneTest()
        {
            Sugar sugarTest = new Sugar();

            Assert.AreEqual(sugarTest.IsNone(), true);
            sugarTest.SetSugarLevel("無糖");
            Assert.AreEqual(sugarTest.IsNone(), false);
        }