Example #1
0
        private static void ShipVerification()
        {
            Console.WriteLine("Enter the name of the ship:");
            registration.ShipName = Console.ReadLine();

            if (ShipChecker.TestIfShipIsInStarWars(StarshipFetcher.GetListOfStarships(), registration.ShipName
                                                   ))
            {
                Console.WriteLine("This ship is approved");
            }
            else
            {
                Console.WriteLine("Wrong ship. Try again");
                ShipVerification();
            }
        }
Example #2
0
 public void StarshipChecker_Returns_False_If_Invalid_Name_Is_Entered()
 {
     Assert.False(ShipChecker.TestIfShipIsInStarWars(StarshipFetcher.GetListOfStarships(), "Centennial Screechbird"));
 }
Example #3
0
 public void StarshipChecker_Returns_True_If_Valid_Name_Is_Entered()
 {
     Assert.True(ShipChecker.TestIfShipIsInStarWars(StarshipFetcher.GetListOfStarships(), "Millennium Falcon"));
 }