Closed ioanalazar42 closed 4 years ago
Countries are in TSV format.
CountryTest.java
Country.java
split
NullPointerException
IllegalArgumentException
Country
e.g. countryInfo = Albania\tAL\tALB\t8\t41\t20 should construct the following Country object
countryInfo = Albania\tAL\tALB\t8\t41\t20
Country(countryInfo) { this.name <- Albania this.alpha2code <- AL this.lat <- 41 this.lng <- 20 }
Countries are in TSV format.
Unit Tests ->
CountryTest.java
to test classCountry.java
Test that the parse method does split by tab
split
will not mess with the string itself.Test that an exception is thrown if parsing is attempted on an empty string
NullPointerException
errorIllegalArgumentException
Test that a
Country
object is being constructed properlye.g.
countryInfo = Albania\tAL\tALB\t8\t41\t20
should construct the followingCountry
object