Created
September 28, 2016 05:07
-
-
Save usbportnoy/d1bd5fa99ed0fa13ecb69bdaec3ab055 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| @Test | |
| public void onlineTest() throws Exception { | |
| Profile profile = new Profile(); | |
| //sets instance to right now | |
| Calendar calendar = Calendar.getInstance(); | |
| //get time of right now and set users online status with it | |
| profile.setLastOnline(calendar.getTime()); | |
| //create and configure | |
| OnlineStatus onlineStatus = new OnlineStatus(); | |
| onlineStatus.setOnlineThresholdHrs(1); | |
| OnlineStatus.States status = onlineStatus.getStatus( | |
| profile.getLastOnline(), | |
| calendar | |
| ); | |
| assertEquals(status, OnlineStatus.States.Online); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment