PassportScanner.kt

1
package com.adventofcode.day04
2
3 1 1. getPassports : replaced return value with Collections.emptyList for com/adventofcode/day04/PassportScanner::getPassports → KILLED
class PassportScanner(val passports: List<Passport>) {
4
5
6
    fun simplyValidateAllPassports(): PassportsValidator {
7
        return SimplePassportsValidator(passports)
8
    }
9
10
    fun fullyValidateAllPassports(): PassportsValidator {
11
        return FullPassportsValidator(passports)
12
    }
13
14
    companion object {
15
16
        fun readPassportFrom(input: String): PassportScanner {
17
            return PassportScanner(listOf(Passport.fromInput(input)))
18
        }
19
20
        fun readPassportsFrom(input: String): PassportScanner {
21
22
            return PassportScanner(input.split("\n\n")
23
                    .map { Passport.fromInput(it) }
24
                    .toList())
25
        }
26
    }
27
}

Mutations

3

1.1
Location : getPassports
Killed by : com.adventofcode.day04.PassportScannerTest.[engine:junit-jupiter]/[class:com.adventofcode.day04.PassportScannerTest]/[method:shouldReadPassportFromRawDataWithOneBreakLine()]
replaced return value with Collections.emptyList for com/adventofcode/day04/PassportScanner::getPassports → KILLED

Active mutators

Tests examined


Report generated by PIT 1.6.1