Skip to content
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ before_install:

# Get gradle
- chmod +x gradlew
- wget http://services.gradle.org/distributions/gradle-5.3-bin.zip
- wget https://services.gradle.org/distributions/gradle-5.3-bin.zip
- unzip -qq gradle-5.3-bin.zip
- export GRADLE_HOME=$PWD/gradle-5.3
- export PATH=$GRADLE_HOME/bin:$PATH
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,8 @@ String getProvinceName(){
public int compareTo(City o) {
return city.compareTo(o.getCityName());
}

public boolean sameCityName(City city) {
return this.city.equals(city.getCityName());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,11 @@ void testCountCities() {

assertEquals(1, cityList.countCities());
}

@Test
void testSameCityName() {
City city = mockCity();
City testCity = new City("Edmonton", "new province");
assertTrue(testCity.sameCityName(mockCity()));
}
}