예제 #1
0
        public void GetPlanes()
        {
            Airport ny = Airport.GetInstance();

            Plane p1 = ny.AcquireReusable();
            Plane p2 = ny.AcquireReusable();

            Assert.AreNotEqual <Plane>(p1, p2);
        }
예제 #2
0
        public void CorrectRealase()
        {
            Airport ny = Airport.GetInstance();

            Plane p1 = ny.AcquireReusable();

            ny.RealaseReusable(p1);

            Plane p2 = ny.AcquireReusable();

            Assert.AreEqual <Plane>(p1, p2);
        }
예제 #3
0
        public void NotAirpotPlane()
        {
            Airport ny = Airport.GetInstance();

            Plane p1 = ny.AcquireReusable();

            ny.RealaseReusable(p1);

            Plane p2 = new Plane("sam");

            ny.RealaseReusable(p2);
        }