Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring of verification #126

Closed
wants to merge 2 commits into from
Closed

Refactoring of verification #126

wants to merge 2 commits into from

Conversation

ccellar
Copy link
Contributor

@ccellar ccellar commented Apr 3, 2014

Work in progress

  • Maybe we should switch to fixed utc dates for tests?
  • Months and years expressed as a number of days is not exactly that good. Depends on many factors like calenders, and so on

[Fact]
public void OneSecondFromNow()
{
var oneSecondFromNow = Resources.GetResource(ResourceKeys.DateHumanize.GetResourceKey(TimeUnit.Second, TimeUnitTense.Future, count: 1));
Verify(oneSecondFromNow, new TimeSpan(0, 0, 0, 1));
DateVerification.Verify(oneSecondFromNow, new TimeSpan(0, 0, 0, 1));
Copy link
Member

Choose a reason for hiding this comment

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

I don't know why I used new TimeSpan here. I think we should use TimeSpan.Fromxxx methods instead; e.g. TimeSpan.FromSeconds(1).

Copy link
Member

Choose a reason for hiding this comment

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

In fact looking at this class, I think it should be completely refactored to look like new DateTime.Humanize tests (e.g. Arabic ones). See #125

@MehdiK
Copy link
Member

MehdiK commented Apr 6, 2014

Sorry. I had to make this fix ASAP because we have random failing tests on CI. So I created #131 that supersedes this. I would appreciate if you could please review. Thanks for the initiative and getting the ball rolling.

@MehdiK MehdiK closed this Apr 6, 2014
@ccellar
Copy link
Contributor Author

ccellar commented Apr 8, 2014

No worries. I will take a look regarding your changes.

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