Skip to content

lab 3_2#2

Open
charmingcharles wants to merge 11 commits intoMTO-2022-pt:charmingcharlesfrom
charmingcharles:master
Open

lab 3_2#2
charmingcharles wants to merge 11 commits intoMTO-2022-pt:charmingcharlesfrom
charmingcharles:master

Conversation

@charmingcharles
Copy link

@charmingcharles charmingcharles commented Apr 7, 2022

Karol Leśniewski 222491, przypomniałem sobie istnienie skrótu klawiszowego CTRL + B

public void confirm() {
requireState(State.SUBMITTED);
long hoursElapsedAfterSubmittion = subbmitionDate.until(LocalDateTime.now(), ChronoUnit.HOURS);
long hoursElapsedAfterSubmittion = subbmitionDate.until(((currentDate == null) ? LocalDateTime.now() : currentDate), ChronoUnit.HOURS);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to nie jest dobre rozwiązanie wprowadza pan logikę wyliczanie daty "pod testy". Nie chodziło o to, aby do konstruktora przekazać "przesuniętą datę" (albo null - co oznacza brak przesunięcia). Zamówienie powinno wyliczać czas zgodnie z założeniami, ale być zależna od "zegara", który w testach można "zamockować"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants