1package com.xtremelabs.robolectric.shadows;
2
3import android.accounts.Account;
4import android.content.PeriodicSync;
5import android.os.Bundle;
6import com.xtremelabs.robolectric.WithTestDefaultsRunner;
7import org.junit.Test;
8import org.junit.runner.RunWith;
9
10import static org.hamcrest.CoreMatchers.equalTo;
11import static org.hamcrest.CoreMatchers.is;
12import static org.junit.Assert.assertNotNull;
13import static org.junit.Assert.assertThat;
14
15@RunWith(WithTestDefaultsRunner.class)
16public class PeriodicSyncTest {
17
18    @Test
19    public void shouldHaveConstructor() throws Exception {
20        Account a = new Account("a", "b");
21        PeriodicSync sync = new PeriodicSync(a, "auth",
22                new Bundle(), 120l);
23
24        assertThat(sync.account, is(a));
25        assertThat(sync.authority, equalTo("auth"));
26        assertThat(sync.period, equalTo(120l));
27        assertNotNull(sync.extras);
28    }
29}
30