// Path: androidsdk/src/main/java/com/wootric/androidsdk/Constants.java
// public class Constants {
// 
//     public static final long DAY_IN_MILLIS = 1000L *60L *60L *24L;
// 
//     public static final int NOT_SET = -1;
// 
//     public static final long DEFAULT_RESURVEY_DAYS = 90L;
// 
//     public static final long DEFAULT_DECLINE_RESURVEY_DAYS = 30L;
// 
//     public static final String TAG = "WOOTRIC_SDK";
// 
//     public static final String CES = "CES";
// 
//     public static final String CSAT = "CSAT";
// }


import android.net.Uri;
import android.util.Log;
import com.wootric.androidsdk.Constants;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
import org.robolectric.RobolectricTestRunner;
import java.util.Date;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.doReturn;
package com.wootric.androidsdk.objects;






@RunWith(RobolectricTestRunner.class)
public class SettingsTest {

    public static final String LOCALIZED_FINAL_THANK_YOU = "Localized final thank you!";
    public static final String LOCALIZED_THANK_YOU_SETUP = "Localized thank you setup";

    public static final String EMAIL = "nps@test.com";
    
    @Mock
    LocalizedTexts mockLocalizedTexts;

    @Mock
    WootricCustomMessage mockCustomMessage;

    @Mock
    WootricCustomThankYou mockCustomThankYou;

    @Before
    public void setUpMockito() {
        MockitoAnnotations.initMocks(this);
    }

    @After
    public void tearDownMockito() {
        Mockito.validateMockitoUsage();
    }

    @Test
    public void whenTimeFromIsNotSet_itReturnsTrue() throws Exception {
        Settings settings = new Settings();

        assertThat(settings.firstSurveyDelayPassed(Constants.NOT_SET)).isTrue();
    }

    @Test
    public void whenTimeFromIsBeforeFirstSurveyTime_itReturnsTrue() throws Exception {
        Settings settings = new Settings();

// Path: androidsdk/src/main/java/com/wootric/androidsdk/Constants.java
// public class Constants {
// 
//     public static final long DAY_IN_MILLIS = 1000L *60L *60L *24L;
// 
//     public static final int NOT_SET = -1;
// 
//     public static final long DEFAULT_RESURVEY_DAYS = 90L;
// 
//     public static final long DEFAULT_DECLINE_RESURVEY_DAYS = 30L;
// 
//     public static final String TAG = "WOOTRIC_SDK";
// 
//     public static final String CES = "CES";
// 
//     public static final String CSAT = "CSAT";
// }


// Path: androidsdk/src/test/java/com/wootric/androidsdk/objects/SettingsTest.java
import android.net.Uri;
import android.util.Log;
import com.wootric.androidsdk.Constants;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
import org.robolectric.RobolectricTestRunner;
import java.util.Date;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.doReturn;

package com.wootric.androidsdk.objects;






@RunWith(RobolectricTestRunner.class)
public class SettingsTest {

    public static final String LOCALIZED_FINAL_THANK_YOU = "Localized final thank you!";
    public static final String LOCALIZED_THANK_YOU_SETUP = "Localized thank you setup";

    public static final String EMAIL = "nps@test.com";
    
    @Mock
    LocalizedTexts mockLocalizedTexts;

    @Mock
    WootricCustomMessage mockCustomMessage;

    @Mock
    WootricCustomThankYou mockCustomThankYou;

    @Before
    public void setUpMockito() {
        MockitoAnnotations.initMocks(this);
    }

    @After
    public void tearDownMockito() {
        Mockito.validateMockitoUsage();
    }

    @Test
    public void whenTimeFromIsNotSet_itReturnsTrue() throws Exception {
        Settings settings = new Settings();

        assertThat(settings.firstSurveyDelayPassed(Constants.NOT_SET)).isTrue();
    }

    @Test
    public void whenTimeFromIsBeforeFirstSurveyTime_itReturnsTrue() throws Exception {
        Settings settings = new Settings();

        long timeBeforeFirstSurvey = new Date().getTime() - 31L * Constants.DAY_IN_MILLIS;