ParameterizedTest

@ParameterizedTest

@ValueSource

@ParameterizedTest
@DisplayName("5자 이하의 이름을 가진 자동차 생성 테스트")
@ValueSource(strings = {"pobi", "crong", "honux"})
void createCarWithName(String name) {
    car = new Car (name);
    assertThat(car.getName()).isEqualTo(name);
}

@MethodSource

static Stream<Arguments> **distances**() {
    return Stream.of(
            Arguments.of(new MoveStrategy[]{() -> false, () -> false, () -> false}, new Car(carName, 0)),
            Arguments.of(new MoveStrategy[]{() -> true, () -> true, () -> true}, new Car(carName, 3)),
            Arguments.of(new MoveStrategy[]{() -> true, () -> false, () -> true}, new Car(carName, 2))
    );
}

@ParameterizedTest
@DisplayName("이동거리 확인 테스트")
@MethodSource("**distances**")
void checkPosition(MoveStrategy[] positions, Car expected) {
    for (MoveStrategy moveStrategy : positions) {
        car = car.move(moveStrategy);
    }
    assertEquals(expected, car);
}

@NullAndEmptySource