Beispiel #1
0
        private IEnumerable <TestCaseData> GetHotelNames()
        {
            List <TestCaseData> tests  = new List <TestCaseData>();
            CSVReader           reader = new CSVReader("Test Data\\Top2000HotelNames.csv", true);

            while (reader.Read())
            {
                HotelExtrasTestScript data = new HotelExtrasTestScript()
                {
                    TestName    = reader["Test_Name"]
                    , HotelName = reader["Hotel_Name"]
                };
                tests.Add(NUnitModule.CreateTestCaseData(data, data.TestName, ""));
            }
            return(tests);
        }
Beispiel #2
0
        private IEnumerable <TestCaseData> GetTestData()
        {
            List <TestCaseData> tests  = new List <TestCaseData>();
            CSVReader           reader = new CSVReader("Test Data\\FlightSOA_Availability_TestData.csv", true);

            while (reader.Read())
            {
                TestScript data = new TestScript()
                {
                    TestName           = reader["Test_Name"]
                    , Destination      = reader["Destination"]
                    , DepartureDate    = reader["Departure_Date"]
                    , ReturnDate       = reader["Return_Date"]
                    , DepartureAirport = reader["Departure_Airport"]
                    , Adults           = int.Parse(reader["Adults"])
                    , Children         = int.Parse(reader["Children"])
                    , ChildrenAges     = (reader["Children_Ages"] != null ? reader["Children_Ages"].Split(',').Select(i => int.Parse(i)).ToArray() : new int[0])
                };
                tests.Add(NUnitModule.CreateTestCaseData(data, data.TestName, ""));
            }
            return(tests);
        }