コード例 #1
0
        public List <MilitaryPlane> GetTransportMilitaryPlanes()
        {
            List <MilitaryPlane> transportMilitaryPlanes = new List <MilitaryPlane>();

            for (int i = 0; i < GetMilitaryPlanes().Count; i++)
            {
                MilitaryPlane plane = GetMilitaryPlanes()[i];
                if (plane.GetPlaneType() == MilitaryType.TRANSPORT)
                {
                    transportMilitaryPlanes.Add(plane);
                }
            }

            return(transportMilitaryPlanes);
        }
コード例 #2
0
        public void GetPlaneTypeTest()
        {
            MilitaryPlane militaryPlane = new MilitaryPlane("model", 999, 9999, 99999, Aircompany.Models.MilitaryAirplaneType.Bomber);

            Assert.AreEqual(Aircompany.Models.MilitaryAirplaneType.Bomber, militaryPlane.GetPlaneType());
        }