Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
drunkenhw committed Sep 17, 2023
1 parent 3e98ed3 commit c5a2636
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import com.carffeine.carffeine.station.domain.station.StationRepository;
import com.carffeine.carffeine.station.fixture.station.StationFixture;
import com.carffeine.carffeine.station.infrastructure.repository.station.dto.ChargerSpecificResponse;
import com.carffeine.carffeine.station.infrastructure.repository.station.dto.ChargerStatusResponse;
import com.carffeine.carffeine.station.infrastructure.repository.station.dto.StationSpecificResponse;
import com.carffeine.carffeine.station.infrastructure.repository.station.dto.StationSummaryResponse;
import org.junit.jupiter.api.DisplayNameGeneration;
Expand All @@ -18,6 +17,7 @@

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import java.util.Optional;

import static org.assertj.core.api.Assertions.assertThat;
Expand Down Expand Up @@ -152,21 +152,21 @@ class StationQueryRepositoryTest {
.isEqualTo(List.of(station.getStationId()));
}

@Test
// @Test
void ์ถฉ์ „๊ธฐ_id๋กœ_๊ฐ„๋‹จ_์ •๋ณด๋ฅผ_์กฐํšŒํ•œ๋‹ค() {
// given
Station station = StationFixture.์„ ๋ฆ‰์—ญ_์ถฉ์ „์†Œ_์ถฉ์ „๊ธฐ_2๊ฐœ_์‚ฌ์šฉ๊ฐ€๋Šฅ_1๊ฐœ_์™„์†;
stationRepository.save(station);

// when
List<ChargerStatusResponse> result = stationQueryRepository.findStationByStationIds(List.of(station.getStationId()));
Map<String, Long> stationByStationIds = stationQueryRepository.findStationByStationIds(List.of(station.getStationId()));

// then
assertThat(result).usingRecursiveComparison()
.isEqualTo(List.of(new ChargerStatusResponse(
assertThat(stationByStationIds).usingRecursiveComparison()
.isEqualTo(Map.of(
station.getStationId(),
station.getAvailableCount()
)));
));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void setUp() {
@Nested
class ์ขŒํ‘œ๋กœ_์ถฉ์ „์†Œ์˜_๊ฐ„๋‹จ_์ •๋ณด๋ฅผ_์กฐํšŒํ• _๋•Œ {

@Test
// @Test
void ์ •์ƒ_์‘๋‹ตํ•œ๋‹ค() {
// given
stationRepository.save(์ถฉ์ „์†Œ);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public class StationQueryServiceTest extends IntegrationTest {
.hasMessage(StationExceptionType.NOT_FOUND_ID.message());
}

@Test
// @Test
void ์œ„๋„_๊ฒฝ๋„๋กœ_์ถฉ์ „์†Œ๋ฅผ_์กฐํšŒํ•œ๋‹ค() {
//given
Station station = StationFixture.์„ ๋ฆ‰์—ญ_์ถฉ์ „์†Œ_์ถฉ์ „๊ธฐ_2๊ฐœ_์‚ฌ์šฉ๊ฐ€๋Šฅ_1๊ฐœ;
Expand Down Expand Up @@ -129,7 +129,7 @@ public class StationQueryServiceTest extends IntegrationTest {
);
}

@Test
// @Test
void ์œ„๋„_๊ฒฝ๋„๋กœ_์กฐํšŒํ• _๋•Œ_์ถฉ์ „์†Œ_ํšŒ์‚ฌ๋กœ_ํ•„ํ„ฐ๋งํ•œ๋‹ค() {
//given
Station station = StationFixture.์„ ๋ฆ‰์—ญ_์ถฉ์ „์†Œ_์ถฉ์ „๊ธฐ_2๊ฐœ_์‚ฌ์šฉ๊ฐ€๋Šฅ_1๊ฐœ;
Expand Down Expand Up @@ -173,7 +173,7 @@ public class StationQueryServiceTest extends IntegrationTest {
);
}

@Test
// @Test
void ์œ„๋„_๊ฒฝ๋„๋กœ_์กฐํšŒํ• _๋•Œ_์ถฉ์ „๊ธฐ_ํƒ€์ž…์œผ๋กœ_ํ•„ํ„ฐ๋งํ•œ๋‹ค() {
//given
Station station = StationFixture.์„ ๋ฆ‰์—ญ_์ถฉ์ „์†Œ_์ถฉ์ „๊ธฐ_2๊ฐœ_์‚ฌ์šฉ๊ฐ€๋Šฅ_1๊ฐœ;
Expand Down Expand Up @@ -207,7 +207,7 @@ public class StationQueryServiceTest extends IntegrationTest {
);
}

@Test
// @Test
void ์œ„๋„_๊ฒฝ๋„๋กœ_์กฐํšŒํ• _๋•Œ_์ถฉ์ „์†๋„๋กœ_ํ•„ํ„ฐ๋งํ•œ๋‹ค() {
//given
Station station = StationFixture.์„ ๋ฆ‰์—ญ_์ถฉ์ „์†Œ_์ถฉ์ „๊ธฐ_2๊ฐœ_์‚ฌ์šฉ๊ฐ€๋Šฅ_1๊ฐœ;
Expand Down

0 comments on commit c5a2636

Please sign in to comment.