-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor HomeView and add ServiceConfig
Refactor the HomeView class to integrate ClockEventService and improve button state management. Introduce ServiceConfig class to configure ClockEventService bean with ClockEclipseAdapter. Added comprehensive unit tests to verify these changes.
- Loading branch information
1 parent
23a7c60
commit 22d16d8
Showing
4 changed files
with
95 additions
and
42 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package dev.nathanlively; | ||
|
||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
import java.time.Clock; | ||
|
||
@Configuration | ||
public class ServiceConfig { | ||
@Bean | ||
public ClockEventService clockEventService(EclipseClockRepository eclipseClockRepository) { | ||
ClockRepository clockEclipseAdapter = new ClockEclipseAdapter(eclipseClockRepository); | ||
return new ClockEventService(clockEclipseAdapter, Clock.systemDefaultZone()); | ||
} | ||
} |
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