Skip to content

Commit 4915b5b

Browse files
committed
refactor: 미사용, 불필요, 중복 코드 삭제
1 parent be9d153 commit 4915b5b

File tree

5 files changed

+14
-26
lines changed

5 files changed

+14
-26
lines changed

src/main/java/roomescape/model/reservation/Reservation.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,19 @@ public void setName(String name) {
3131
this.name = name;
3232
}
3333

34-
public void setDate(String date) {
35-
this.date = date;
36-
}
37-
38-
public void setTime(Time time) {
39-
this.time = time;
40-
}
41-
4234
public String getDate() {
4335
return date;
4436
}
4537

38+
public void setDate(String date) {
39+
this.date = date;
40+
}
41+
4642
public Time getTime() {
4743
return time;
4844
}
45+
46+
public void setTime(Time time) {
47+
this.time = time;
48+
}
4949
}

src/main/java/roomescape/model/reservation/ReservationRepository.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ private static class ReservationRowMapper implements RowMapper<Reservation> {
3636
@Override
3737
public Reservation mapRow(ResultSet rs, int rowNum) throws SQLException {
3838

39-
Long timeId = rs.getLong("time_id");
39+
// Long timeId = rs.getLong("time_id");
4040
String timeValue = rs.getString("time_value");
4141

4242
Time time = new Time(timeValue);
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# h2-console
21
spring.h2.console.enabled=true
32
spring.h2.console.path=/h2-console
4-
# db url
5-
# h2 -> database
6-
spring.datasource.url=jdbc:h2:mem:database
3+
spring.datasource.url=jdbc:h2:mem:database

src/main/resources/data.sql

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/test/java/roomescape/MissionStepTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,20 +170,21 @@ public class MissionStepTest {
170170
.when().post("/times")
171171
.then().log().all()
172172
.statusCode(201)
173-
.header("Location", "/times/10");
173+
.header("Location", "/times/1");
174174

175175
RestAssured.given().log().all()
176176
.when().get("/times")
177177
.then().log().all()
178178
.statusCode(200)
179-
.body("size()", is(10));
179+
.body("size()", is(1));
180180

181181
RestAssured.given().log().all()
182-
.when().delete("/times/10")
182+
.when().delete("/times/1")
183183
.then().log().all()
184184
.statusCode(204);
185185
}
186186

187+
187188
@Test
188189
void 구단계() {
189190
Map<String, String> reservation = new HashMap<>();

0 commit comments

Comments
 (0)