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));
        }
Esempio n. 2
0
 public void validateLocationCode_ShouldParseValidLocationCodes(string input)
 {
     Assert.True(EnvCanadaLocationValidator.validateLocationCode(input));
 }
Esempio n. 3
0
 public void validateLocationCode_ShouldRejectInvalidLocationCodes(string input)
 {
     Assert.False(EnvCanadaLocationValidator.validateLocationCode(input));
 }