This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import kotlinx.serialization.Serializable | |
@Serializable | |
data class DeviceUsed( | |
val manufacturer: String?, | |
val deviceName: String?, | |
val thumbnailUrl: String?, | |
val imageUrl: String? | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SuperHeroesViewModelTest { | |
@get:Rule | |
val instantTaskExecutorRule = InstantTaskExecutorRule() | |
private val superHeroesRepository = mockk<SuperHeroesRepository>() | |
private lateinit var superHeroesViewModel: SuperHeroesViewModel | |
private val listOfSuperHeroes = listOf(SuperHero("Iron Man"), SuperHero("Hulk")) | |
private val successfulSuperHeroesResult = Result.Success(listOfSuperHeroes) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Builder Pattern | |
public class NutritionFacts { | |
private final int servingSize; | |
private final int servings; | |
private final int calories; | |
private final int fat; | |
private final int sodium; | |
private final int carbohydrate; | |
public static class Builder { |