Skip to content

Commit

Permalink
Added spock test
Browse files Browse the repository at this point in the history
  • Loading branch information
benfortuna committed Jan 15, 2020
1 parent 64fc6cb commit 75b2653
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/test/groovy/net/fortuna/ical4j/model/WeekDaySpec.groovy
@@ -0,0 +1,20 @@
package net.fortuna.ical4j.model

import net.fortuna.ical4j.util.Dates
import spock.lang.Specification
import spock.lang.Unroll

class WeekDaySpec extends Specification {

@Unroll
def 'assert result of getNegativeMonthlyOffset'() {

expect: 'returned result matches expected'
WeekDay.getNegativeMonthlyOffset(cal) as String == expected

where:
cal | expected
Dates.getCalendarInstance(new Date('20180228')) | '-3WE'
Dates.getCalendarInstance(new Date('20191130')) | '-3WE'
}
}

0 comments on commit 75b2653

Please sign in to comment.