I'm pretty new to unit testing. I've been given the task of testing this code. I understand that I have to use assertEquals to check if for example if RegionData.Key.DEV returns VZCRegion.Development. Any help would be appreciated.
fun fromCakeSliceRegion(cakeSliceIndex: RegionData.Key): VZCRegion {
return when (cakeSliceIndex) {
RegionData.Key.DEV -> VZCRegion.Development
RegionData.Key.EU_TEST -> VZCRegion.EuropeTest
RegionData.Key.US_TEST -> VZCRegion.UnitedStatesTest
RegionData.Key.US_STAGING -> VZCRegion.UnitedStatesStage
RegionData.Key.EU_STAGING -> VZCRegion.EuropeStage
RegionData.Key.LOCAL, RegionData.Key.EU_LIVE -> VZCRegion.Europe
RegionData.Key.AP_LIVE, RegionData.Key.US_LIVE -> VZCRegion.UnitedStates
RegionData.Key.PERFORMANCE, RegionData.Key.PERFORMANCE -> VZCRegion.Performance
}