Re: What to test in time-dependent function?

Date: 2020-08-24 08:01 pm (UTC)
dennisgorelik: 2020-06-13 in my home office (Default)
> Добрый вечер", "Добрый день", или "Доброе утро" в зависимости от своего местного времени.

В данном случае, достаточно extract deterministic метод:
static string TimeToGreeting(DateTime time) { ... }
и покрыть его тестами.
Зачем, в данном случае, mocks?
This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

May 2025

S M T W T F S
    1 2 3
456 7 8 9 10
11 121314151617
181920 21 222324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 24th, 2025 11:49 am
Powered by Dreamwidth Studios