Created
January 13, 2013 09:14
-
-
Save debop/4523134 to your computer and use it in GitHub Desktop.
DayOfWeek Test Code
This file contains 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
package kr.kth.timeperiod | |
import kr.kth.commons.slf4j.Logging | |
import org.junit.{Assert, Test} | |
import org.joda.time.DateTimeConstants | |
/** | |
* kr.kth.timeperiod.ScalaDayOfWeekTest | |
* User: sunghyouk.bae@gmail.com | |
* Date: 13. 1. 13. | |
*/ | |
class ScalaDayOfWeekTest extends Logging { | |
@Test | |
def dayOfWeekEquals() { | |
val sunday = ScalaDayOfWeek.Sunday | |
val parsed = ScalaDayOfWeek.withName("Sunday") | |
Assert.assertEquals(sunday, parsed) | |
Assert.assertEquals("Sunday", sunday.toString) | |
Assert.assertNotEquals(ScalaDayOfWeek.Friday,ScalaDayOfWeek.Monday) | |
Assert.assertEquals(ScalaDayOfWeek.Monday, ScalaDayOfWeek(DateTimeConstants.MONDAY)) | |
log.debug(ScalaDayOfWeek.values) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment