-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6e50ec1
commit 6ccaa9d
Showing
1 changed file
with
57 additions
and
0 deletions.
There are no files selected for viewing
57 changes: 57 additions & 0 deletions
57
backend/src/test/java/com/twtw/backend/domain/path/service/PathServiceTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package com.twtw.backend.domain.path.service; | ||
|
||
import com.twtw.backend.domain.path.dto.client.car.SearchCarPathRequest; | ||
import com.twtw.backend.domain.path.dto.client.car.SearchCarPathResponse; | ||
import com.twtw.backend.domain.path.dto.client.car.SearchPathFuel; | ||
import com.twtw.backend.domain.path.dto.client.car.SearchPathOption; | ||
import com.twtw.backend.domain.path.dto.client.ped.SearchPedPathRequest; | ||
import com.twtw.backend.domain.path.dto.client.ped.SearchPedPathResponse; | ||
import com.twtw.backend.support.service.LoginTest; | ||
import org.junit.jupiter.api.DisplayName; | ||
import org.junit.jupiter.api.Test; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
|
||
import static org.assertj.core.api.Assertions.assertThat; | ||
|
||
|
||
@DisplayName("PathService의") | ||
public class PathServiceTest extends LoginTest { | ||
@Autowired private PathService pathService; | ||
|
||
@Test | ||
@DisplayName("차량 경로를 탐색할 수 있는가") | ||
void searchCarPath(){ | ||
// given | ||
SearchCarPathRequest request = new SearchCarPathRequest( | ||
"126.827507,37.636040", | ||
"126.832659,37.644998", | ||
"", | ||
SearchPathOption.TRAFAST, | ||
SearchPathFuel.DIESEL, | ||
1); | ||
// when | ||
|
||
SearchCarPathResponse response = pathService.searchCarPath(request); | ||
|
||
// then | ||
|
||
assertThat(response.getCode()).isEqualTo(0); | ||
} | ||
|
||
@Test | ||
@DisplayName("보행자 경로를 탐색할 수 있는가") | ||
void searchPedPath(){ | ||
// given | ||
SearchPedPathRequest request = new SearchPedPathRequest( | ||
126.827507,37.636040, | ||
126.832659,37.644998, | ||
"START_POINT", | ||
"END_POINT" | ||
); | ||
// when | ||
SearchPedPathResponse response = pathService.searchPedPath(request); | ||
|
||
// then | ||
assertThat(response).isNotNull(); | ||
} | ||
} |