예제 #1
0
        public void Employee_Cindy_Hire()
        {
            Employee Cindy = new Taiwaneese("Cindy");
            Cindy.Age = 20;

            Assert.AreEqual(Cindy.Hire(), true);
        }
예제 #2
0
        public void Employee_Amy_Hire()
        {
            Employee Amy = new Taiwaneese("Amy");
            Amy.Age = 30;

            Assert.AreEqual(Amy.Hire(), true);
        }
예제 #3
0
        public void Employee_Cindy_Cannot_Hire()
        {
            Employee Cindy = new Taiwaneese("Cindy");
            Cindy.Age = 19;

            Assert.AreEqual(Cindy.Hire(), false);
        }
예제 #4
0
        public void Employee_Amy_Cannot_Hire()
        {
            Employee Amy = new Taiwaneese("Amy");
            Amy.Age = 20;

            Assert.AreEqual(Amy.Hire(), false);
        }
예제 #5
0
        static void Main(string[] args)
        {
            Employee Amy = new Taiwaneese("Amy");
            Amy.Age = 20;

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

            Employee Cindy = new Taiwaneese("Cindy");
            Cindy.Age = 20;

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