예제 #1
0
        public void AcquireWorking()
        {
            AirPort a = new AirPort();
            Plane   p = a.AcquirePlane();

            Assert.IsNotNull(p);
        }
예제 #2
0
        public void CapacityWorking()
        {
            AirPort      a      = new AirPort();
            List <Plane> planes = new List <Plane>();

            for (int i = 0; i < 10; i++)
            {
                planes.Add(a.AcquirePlane());
            }

            for (int i = 0; i < 10; i++)
            {
                Assert.IsNotNull(planes[i]);
            }

            Assert.ThrowsException <ArgumentException>(() =>
            {
                Plane temp = a.AcquirePlane();
            });
        }
예제 #3
0
        public void ReleaseWorking()
        {
            AirPort a = new AirPort();
            Plane   p = a.AcquirePlane();

            Assert.IsNotNull(p);

            Assert.ThrowsException <ArgumentException>(() =>
            {
                a.ReleaseReusable(new Plane());
            });
        }