package io.ljunggren.sendgrid.api.service;
import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.CsvSource;
class AggregationTest {
@ParameterizedTest
@CsvSource({
"DAY, day",
"WEEK, week",
"MONTH, month"
})
void getValue_returnsExpectedString(Aggregation aggregation, String expected) {
assertEquals(expected, aggregation.getValue());
}
@org.junit.jupiter.api.Test
void valueOf_roundTrip() {
assertEquals(Aggregation.DAY, Aggregation.valueOf("DAY"));
assertEquals(3, Aggregation.values().length);
}
}