// Path: lib-recur-hamcrest/src/main/java/org/dmfs/rfc5545/hamcrest/RecurrenceRuleMatcher.java
// public static <T> Matcher<T> are(Matcher<T> matcher)
// {
//     Description description = new StringDescription();
//     matcher.describeTo(description);
//     return describedAs(String.format("are %s", description.toString()), is(matcher));
// }
// 
// Path: lib-recur-hamcrest/src/main/java/org/dmfs/rfc5545/hamcrest/RecurrenceRuleMatcher.java
// public static Function<DateTime, Matcher<RecurrenceRule>> instances(Matcher<DateTime> dtMatchers)
// {
//     return dateTime -> InstancesMatcher.instances(dateTime, dtMatchers);
// }
// 
// Path: lib-recur-hamcrest/src/main/java/org/dmfs/rfc5545/hamcrest/RecurrenceRuleMatcher.java
// public static Function<DateTime, Matcher<RecurrenceRule>> startingWith(String... dates)
// {
//     return startingWith(new Seq<>(dates));
// }
// 
// Path: lib-recur-hamcrest/src/main/java/org/dmfs/rfc5545/hamcrest/RecurrenceRuleMatcher.java
// public static Matcher<RecurrenceRule> validRule(DateTime start, Iterable<Function<DateTime, Matcher<RecurrenceRule>>> matcherFunctions)
// {
//     return new AllOf<>(new Joined<>(new Seq<>(increasing(start)), new Mapped<>(f -> f.value(start), matcherFunctions)));
// }
// 
// Path: lib-recur-hamcrest/src/main/java/org/dmfs/rfc5545/hamcrest/RecurrenceRuleMatcher.java
// public static Function<DateTime, Matcher<RecurrenceRule>> walking()
// {
//     return WalkingStartMatcher::walking;
// }
// 
// Path: lib-recur-hamcrest/src/main/java/org/dmfs/rfc5545/hamcrest/datetime/DayOfMonthMatcher.java
// public static Matcher<DateTime> onDayOfMonth(Matcher<Integer> dayMatcher)
// {
//     return new DayOfMonthMatcher(dayMatcher);
// }
// 
// Path: lib-recur-hamcrest/src/main/java/org/dmfs/rfc5545/hamcrest/datetime/DayOfYearMatcher.java
// public static Matcher<DateTime> onDayOfYear(Matcher<Integer> dayMatcher)
// {
//     return new DayOfYearMatcher(dayMatcher);
// }
// 
// Path: lib-recur-hamcrest/src/main/java/org/dmfs/rfc5545/hamcrest/datetime/MonthMatcher.java
// public static Matcher<DateTime> inMonth(Matcher<Integer> monthMatcher)
// {
//     return new MonthMatcher(monthMatcher);
// }
// 
// Path: lib-recur-hamcrest/src/main/java/org/dmfs/rfc5545/hamcrest/datetime/WeekDayMatcher.java
// public static Matcher<DateTime> onWeekDay(Matcher<Weekday> weekdayMatcher)
// {
//     return new WeekDayMatcher(weekdayMatcher);
// }
// 
// Path: lib-recur-hamcrest/src/main/java/org/dmfs/rfc5545/hamcrest/datetime/WeekOfYearMatcher.java
// public static Matcher<DateTime> inWeekOfYear(Matcher<Integer> weekOfYearMatcher)
// {
//     return new WeekOfYearMatcher(weekOfYearMatcher);
// }


import static org.dmfs.rfc5545.hamcrest.datetime.WeekDayMatcher.onWeekDay;
import static org.dmfs.rfc5545.hamcrest.datetime.WeekOfYearMatcher.inWeekOfYear;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;
import org.dmfs.rfc5545.DateTime;
import org.junit.Test;
import static org.dmfs.rfc5545.Weekday.MO;
import static org.dmfs.rfc5545.Weekday.TU;
import static org.dmfs.rfc5545.hamcrest.RecurrenceRuleMatcher.are;
import static org.dmfs.rfc5545.hamcrest.RecurrenceRuleMatcher.instances;
import static org.dmfs.rfc5545.hamcrest.RecurrenceRuleMatcher.startingWith;
import static org.dmfs.rfc5545.hamcrest.RecurrenceRuleMatcher.validRule;
import static org.dmfs.rfc5545.hamcrest.RecurrenceRuleMatcher.walking;
import static org.dmfs.rfc5545.hamcrest.datetime.DayOfMonthMatcher.onDayOfMonth;
import static org.dmfs.rfc5545.hamcrest.datetime.DayOfYearMatcher.onDayOfYear;
import static org.dmfs.rfc5545.hamcrest.datetime.MonthMatcher.inMonth;
/*
 * Copyright 2018 Marten Gajda <marten@dmfs.org>
 *
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.dmfs.rfc5545.recur;




/**
 * @author Marten Gajda
 */
public final class RecurrenceRuleYearlyTest
{
    @Test
    public void test() throws InvalidRecurrenceRuleException
    {
        assertThat(new RecurrenceRule("FREQ=YEARLY;BYWEEKNO=1,10"),
// Path: lib-recur-hamcrest/src/main/java/org/dmfs/rfc5545/hamcrest/RecurrenceRuleMatcher.java
// public static <T> Matcher<T> are(Matcher<T> matcher)
// {
//     Description description = new StringDescription();
//     matcher.describeTo(description);
//     return describedAs(String.format("are %s", description.toString()), is(matcher));
// }
// 
// Path: lib-recur-hamcrest/src/main/java/org/dmfs/rfc5545/hamcrest/RecurrenceRuleMatcher.java
// public static Function<DateTime, Matcher<RecurrenceRule>> instances(Matcher<DateTime> dtMatchers)
// {
//     return dateTime -> InstancesMatcher.instances(dateTime, dtMatchers);
// }
// 
// Path: lib-recur-hamcrest/src/main/java/org/dmfs/rfc5545/hamcrest/RecurrenceRuleMatcher.java
// public static Function<DateTime, Matcher<RecurrenceRule>> startingWith(String... dates)
// {
//     return startingWith(new Seq<>(dates));
// }
// 
// Path: lib-recur-hamcrest/src/main/java/org/dmfs/rfc5545/hamcrest/RecurrenceRuleMatcher.java
// public static Matcher<RecurrenceRule> validRule(DateTime start, Iterable<Function<DateTime, Matcher<RecurrenceRule>>> matcherFunctions)
// {
//     return new AllOf<>(new Joined<>(new Seq<>(increasing(start)), new Mapped<>(f -> f.value(start), matcherFunctions)));
// }
// 
// Path: lib-recur-hamcrest/src/main/java/org/dmfs/rfc5545/hamcrest/RecurrenceRuleMatcher.java
// public static Function<DateTime, Matcher<RecurrenceRule>> walking()
// {
//     return WalkingStartMatcher::walking;
// }
// 
// Path: lib-recur-hamcrest/src/main/java/org/dmfs/rfc5545/hamcrest/datetime/DayOfMonthMatcher.java
// public static Matcher<DateTime> onDayOfMonth(Matcher<Integer> dayMatcher)
// {
//     return new DayOfMonthMatcher(dayMatcher);
// }
// 
// Path: lib-recur-hamcrest/src/main/java/org/dmfs/rfc5545/hamcrest/datetime/DayOfYearMatcher.java
// public static Matcher<DateTime> onDayOfYear(Matcher<Integer> dayMatcher)
// {
//     return new DayOfYearMatcher(dayMatcher);
// }
// 
// Path: lib-recur-hamcrest/src/main/java/org/dmfs/rfc5545/hamcrest/datetime/MonthMatcher.java
// public static Matcher<DateTime> inMonth(Matcher<Integer> monthMatcher)
// {
//     return new MonthMatcher(monthMatcher);
// }
// 
// Path: lib-recur-hamcrest/src/main/java/org/dmfs/rfc5545/hamcrest/datetime/WeekDayMatcher.java
// public static Matcher<DateTime> onWeekDay(Matcher<Weekday> weekdayMatcher)
// {
//     return new WeekDayMatcher(weekdayMatcher);
// }
// 
// Path: lib-recur-hamcrest/src/main/java/org/dmfs/rfc5545/hamcrest/datetime/WeekOfYearMatcher.java
// public static Matcher<DateTime> inWeekOfYear(Matcher<Integer> weekOfYearMatcher)
// {
//     return new WeekOfYearMatcher(weekOfYearMatcher);
// }


// Path: src/test/java/org/dmfs/rfc5545/recur/RecurrenceRuleYearlyTest.java
import static org.dmfs.rfc5545.hamcrest.datetime.WeekDayMatcher.onWeekDay;
import static org.dmfs.rfc5545.hamcrest.datetime.WeekOfYearMatcher.inWeekOfYear;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;
import org.dmfs.rfc5545.DateTime;
import org.junit.Test;
import static org.dmfs.rfc5545.Weekday.MO;
import static org.dmfs.rfc5545.Weekday.TU;
import static org.dmfs.rfc5545.hamcrest.RecurrenceRuleMatcher.are;
import static org.dmfs.rfc5545.hamcrest.RecurrenceRuleMatcher.instances;
import static org.dmfs.rfc5545.hamcrest.RecurrenceRuleMatcher.startingWith;
import static org.dmfs.rfc5545.hamcrest.RecurrenceRuleMatcher.validRule;
import static org.dmfs.rfc5545.hamcrest.RecurrenceRuleMatcher.walking;
import static org.dmfs.rfc5545.hamcrest.datetime.DayOfMonthMatcher.onDayOfMonth;
import static org.dmfs.rfc5545.hamcrest.datetime.DayOfYearMatcher.onDayOfYear;
import static org.dmfs.rfc5545.hamcrest.datetime.MonthMatcher.inMonth;

/*
 * Copyright 2018 Marten Gajda <marten@dmfs.org>
 *
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.dmfs.rfc5545.recur;




/**
 * @author Marten Gajda
 */
public final class RecurrenceRuleYearlyTest
{
    @Test
    public void test() throws InvalidRecurrenceRuleException
    {
        assertThat(new RecurrenceRule("FREQ=YEARLY;BYWEEKNO=1,10"),
                is(validRule(DateTime.parse("20180101"),