public void TestCanNotAddPassengerToFullyBookedFlight()
        {
            var flight = new Flight(1);
            flight.AddPassenger("Michael Jackson");

            Action act = () => flight.AddPassenger("Jannete Jackson");
            act.ShouldThrow<FlightFullyBookedException>();
        }
        public void GetAllPassengerTest()
        {
            var airline = new Airline()
            {
                Name = "Air India", Code = "AI"
            };
            var flight = new Flight(airline);

            flight.AddPassenger("AIPQN1", "Subha", "Ghosh", "*****@*****.**", "A", true, null);
            flight.AddPassenger("AIPQN2", "Subha", "Ghosh", "*****@*****.**", "A", true, null);
            flight.AddPassenger("AIPQN3", "Subha", "Ghosh", "*****@*****.**", "A", true, null);
            Assert.AreEqual(flight.GetAllPassengers().Count, 3);
        }
        public void TestAddPassengerToFlight()
        {
            var flight = new Flight(150);
            flight.AddPassenger("Michael Jackson");

            flight.NumberOfPassengers().Should().Be(1);
            flight.IsPassengerOnFlight("Michael Jackson").Should().BeTrue();
        }
 public void TestEconomyFlightOrdinaryPassenger()
 {
     Assert.AreEqual(1, economyFlight.Id);
     Assert.IsTrue(economyFlight.AddPassenger(mike));
     Assert.AreEqual(2, economyFlight.getPassengersSet().Count);
     Assert.IsTrue(economyFlight.getPassengersSet().Contains(mike));
     Assert.IsTrue(economyFlight.RemovePassenger(mike));
     Assert.AreEqual(0, economyFlight.getPassengersSet().Count);
 }
        public void SearchPassengerInCorrectPRNTest()
        {
            var airline = new Airline()
            {
                Name = "Air India", Code = "AI"
            };
            var flight = new Flight(airline);

            flight.AddPassenger("AIPQN", "Subha", "Ghosh", "*****@*****.**", "A", true, null);
            flight.SearchPassenger("AIPQNs");
        }
        public void RemovePassengerInCorrectPRNTest()
        {
            var airline = new Airline()
            {
                Name = "Air India", Code = "AI"
            };
            var flight = new Flight(airline);

            flight.AddPassenger("AIPQN", "Subha", "Ghosh", "*****@*****.**", "A", true, null);
            flight.RemovePassenger("AIPQNX");
            Assert.AreEqual(flight.PassengerCount, 1);
        }