Exemplo n.º 1
0
        public void Employee_Cindy_Hire()
        {
            Employee Cindy = new Taiwaneese("Cindy");
            Cindy.Age = 20;

            Assert.AreEqual(Cindy.Hire(), true);
        }
Exemplo n.º 2
0
        public void Employee_Cindy_Name()
        {
            log.Info("Employee的姓名是Cindy");
            Employee Cindy = new Taiwaneese("Cindy");

            Assert.AreEqual(Cindy.Name, "Cindy");
        }
Exemplo n.º 3
0
        public void Employee_Cindy_Cannot_Hire()
        {
            Employee Cindy = new Taiwaneese("Cindy");
            Cindy.Age = 19;

            Assert.AreEqual(Cindy.Hire(), false);
        }
Exemplo n.º 4
0
        public void Employee_Amy_Hire()
        {
            Employee Amy = new Taiwaneese("Amy");
            Amy.Age = 30;

            Assert.AreEqual(Amy.Hire(), true);
        }
Exemplo n.º 5
0
        public void Employee_Amy_Cannot_Hire()
        {
            Employee Amy = new Taiwaneese("Amy");
            Amy.Age = 20;

            Assert.AreEqual(Amy.Hire(), false);
        }
Exemplo n.º 6
0
        public void Employee_Cindy_Age()
        {
            log.Debug("Cindy的年齡");
            Employee Cindy = new Taiwaneese("Cindy");
            Cindy.Age = 20;

            Assert.AreEqual(Cindy.Age, 20);
        }
Exemplo n.º 7
0
        static void Main(string[] args)
        {
            Employee Cindy = new Taiwaneese("Cindy");
            Cindy.Age = 20;

            Console.WriteLine("{0}來自 {2} 今年{1}歲", Cindy.Name, Cindy.Age, Cindy.Nationailty);
            Console.WriteLine("我們可以雇用他嗎?", Cindy.Hire);
            Console.ReadLine();
        }