created a simple test class to check the statistics of a TO-DO List app. refer - https://learn.udacity.com/courses/ud940/lessons/d6e700ab-b5d9-4b7b-8bab-64ab79c88f87/concepts/e4e37d5c-2b18-403d-83d9-1646949396f4
the IDE shows no tasks available even though tasks have been added! new to testing please help me out.
class StatisticsUtilsTest{
@Test
fun getActiveAndCompletedStats_noCompleted_returnsHundredZero(){
// Create an active tasks (the false makes this active)
val tasks= listOf<Task>(
Task("title","description", isCompleted = false)
)
// Call our function
val result= getActiveAndCompletedStats(tasks)
// Check the result
assertEquals(0f,result.completedTasksPercent)
assertEquals(100f,result.activeTasksPercent)
}