Exemplo n.º 1
0
        public void GetAllParksTest()
        {
            ParkServiceSqlDAL test     = new ParkServiceSqlDAL(_connectionString);
            List <Park>       parkList = test.GetAllParks();

            Assert.AreEqual(_numberOfParks, parkList.Count);//retrieved the number of rows beforehand to compare to the count in the returned list
        }
Exemplo n.º 2
0
        public void GetForecastByParkCodeTest()
        {
            ParkServiceSqlDAL test     = new ParkServiceSqlDAL(_connectionString);
            List <Park>       parkList = test.GetAllParks();
            Park           firstPark   = parkList[0];
            string         parkID      = firstPark.ParkCode;
            List <Weather> forecast    = test.GetForecastByParkCode(parkID);

            Assert.IsNotNull(forecast);
        }