-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #102 from Cafegory/feature-101
[BUILD SUCCESS] Feature 101
- Loading branch information
Showing
14 changed files
with
389 additions
and
122 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
50 changes: 50 additions & 0 deletions
50
src/test/java/com/example/demo/builder/TestBusinessHourBuilder.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,50 @@ | ||
package com.example.demo.builder; | ||
|
||
import java.time.LocalTime; | ||
|
||
import com.example.demo.domain.cafe.BusinessHour; | ||
import com.example.demo.domain.cafe.Cafe; | ||
|
||
public class TestBusinessHourBuilder { | ||
|
||
private Long id; | ||
private String day; | ||
private LocalTime startTime = LocalTime.MIN; | ||
private LocalTime endTime = LocalTime.MAX; | ||
private Cafe cafe; | ||
|
||
public TestBusinessHourBuilder id(Long id) { | ||
this.id = id; | ||
return this; | ||
} | ||
|
||
public TestBusinessHourBuilder day(String day) { | ||
this.day = day; | ||
return this; | ||
} | ||
|
||
public TestBusinessHourBuilder startTime(LocalTime startTime) { | ||
this.startTime = startTime; | ||
return this; | ||
} | ||
|
||
public TestBusinessHourBuilder endTime(LocalTime endTime) { | ||
this.endTime = endTime; | ||
return this; | ||
} | ||
|
||
public TestBusinessHourBuilder cafe(Cafe cafe) { | ||
this.cafe = cafe; | ||
return this; | ||
} | ||
|
||
public BusinessHour build() { | ||
return BusinessHour.builder() | ||
.id(id) | ||
.day(day) | ||
.startTime(startTime) | ||
.endTime(endTime) | ||
.cafe(cafe) | ||
.build(); | ||
} | ||
} |
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
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
Oops, something went wrong.