Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 240697 Details for
Bug 429959
[tests] create unit tests for "Developer Statistics"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
Test class for DateFormatter
DateFormatterTest.java (text/plain), 1.14 KB, created by
Timur Achmetow
on 2014-03-09 14:44:42 EDT
(
hide
)
Description:
Test class for DateFormatter
Filename:
MIME Type:
Creator:
Timur Achmetow
Created:
2014-03-09 14:44:42 EDT
Size:
1.14 KB
patch
obsolete
>package org.eclipse.recommenders.internal.snipmatch.rcp; > >import static org.junit.Assert.*; > >import java.util.Date; > >import org.eclipse.recommenders.stats.rcp.ui.util.DateFormatter; >import org.junit.Test; > >public class DateFormatterTest { > > @Test > public final void nullCheck() { > assertNull(new DateFormatter().formatUnit(null, null)); > assertNull(new DateFormatter().formatUnit(null, new Date())); > assertNull(new DateFormatter().formatUnit(new Date(), null)); > } > > @Test > public final void formatMinutes() { > String minuteConverter = new DateFormatter().formatUnit(new Date(0), > new Date(60000)); > assertEquals("1 minutes ago", minuteConverter); > } > > @Test > public final void formatHours() { > String minuteConverter = new DateFormatter().formatUnit(new Date(0), > new Date(3600000)); > assertEquals("1 hours ago", minuteConverter); > } > > @Test > public final void formatDays() { > String minuteConverter = new DateFormatter().formatUnit(new Date(0), > new Date(86400000)); > assertEquals("1 days ago", minuteConverter); > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 429959
: 240697 |
240731
|
240732