googleinterns / step228-2020

1 stars 0 forks source link

Unit tests for parsing of country information #17

Closed ioanalazar42 closed 4 years ago

ioanalazar42 commented 4 years ago

Countries are in TSV format.

Unit Tests -> CountryTest.java to test class Country.java

Test that the parse method does split by tab

Test that an exception is thrown if parsing is attempted on an empty string

Test that a Country object is being constructed properly

e.g. countryInfo = Albania\tAL\tALB\t8\t41\t20 should construct the following Country object

Country(countryInfo) {
  this.name <- Albania
  this.alpha2code <- AL
  this.lat <- 41
  this.lng <- 20  
}