public StationDataFile(TextReader reader)
        {
            StationName = reader.ReadLine().Trim();

            MonthlyData = new MonthlyStationDataCollection();

            while (true)
            {
                var line = reader.ReadLine();
                if (line == "              degC    degC    days      mm   hours")
                {
                    break;
                }

                if (line == null)
                {
                    throw new Exception("End of file reached before getting to the data!");
                }
            }

            while (true)
            {
                var line = reader.ReadLine();

                if (line == null)
                {
                    break;
                }

                MonthlyStationData msd = null;
                if (ParseDataLine(line, ref msd))
                {
                    MonthlyData.Add(msd);
                }
            }
        }
 public void TearDown()
 {
     sampleMonthlyData = null;
 }
        public void SetUp()
        {
            sampleMonthlyData = new MonthlyStationDataCollection();

            sampleMonthlyData.Add(new MonthlyStationData(1948, 1, 8.9, 3.3, null, 85.0, null, null, false));
            sampleMonthlyData.Add(new MonthlyStationData(1948, 2, 7.9, 2.2, null, 26.0, null, null, false));
            sampleMonthlyData.Add(new MonthlyStationData(2005, 7, 23.3, 14.1, 0, 45.8, 202.5, true, false));
            sampleMonthlyData.Add(new MonthlyStationData(2005, 8, 23.2, 13.0, 0, 42.4, 250.4, true, false));
            sampleMonthlyData.Add(new MonthlyStationData(2012, 12, 9.0, 2.6, 10, 95.8, 58.0, false, false));
            sampleMonthlyData.Add(new MonthlyStationData(2013, 5, 16.4, 7.7, 0, 41.8, 163.3, false, true));
        }