package kr.co.zumo.app.lifeplus.model;

import org.junit.Before;
import org.junit.Test;

import static junit.framework.Assert.assertEquals;
import static org.powermock.api.mockito.PowerMockito.mock;

public class SuperModelTest {
  BaseSharedPreferences baseSharedPreferences;
  LifeplusPreferences lifeplusPreferences;

  @Before
  public void setup() {
    baseSharedPreferences = mock(BaseSharedPreferences.class);
    lifeplusPreferences = new LifeplusPreferences(baseSharedPreferences);

    SuperModel.getInstance().init(lifeplusPreferences);
  }

  @Test
  public void getPreferences() {
    assertEquals(lifeplusPreferences, SuperModel.getInstance().getPreferences());
  }
}