public void ParseXML_ShouldReturnAValidLocationID(string filename)
        {
            // Arrange
            StreamReader reader   = new StreamReader("./TestXMLFiles/" + filename);
            string       inputXML = reader.ReadToEnd();

            // Act
            EnvCanadaCurrentWeatherParser parser = new EnvCanadaCurrentWeatherParser();
            CurrentWeather result = parser.ParseXML(inputXML);

            // Assert
            Assert.True(EnvCanadaLocationValidator.validateLocationCode(result.LocationId));
        }
Example #2
0
 public void validateLocationCode_ShouldParseValidLocationCodes(string input)
 {
     Assert.True(EnvCanadaLocationValidator.validateLocationCode(input));
 }
Example #3
0
 public void validateLocationCode_ShouldRejectInvalidLocationCodes(string input)
 {
     Assert.False(EnvCanadaLocationValidator.validateLocationCode(input));
 }