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