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

import org.junit.Test;

import kr.co.zumo.app.BuildConfig;

import static org.junit.Assert.assertTrue;

public class AppUtilTest {

  @Test
  public void isDebug() {

    if (BuildConfig.BUILD_TYPE.equals("debug")) {
      assertTrue(AppUtil.isDebug() == true);
    }
    else if (BuildConfig.BUILD_TYPE.equals("release")) {
      assertTrue(AppUtil.isDebug() == false);
    }
    else {
      assertTrue("Unknown build type -------> " + BuildConfig.BUILD_TYPE, false);
    }
  }

  @Test
  public void isRelease() {

    if (BuildConfig.BUILD_TYPE.equals("debug")) {
      assertTrue(AppUtil.isRelease() == false);
    }
    else if (BuildConfig.BUILD_TYPE.equals("release")) {
      assertTrue(AppUtil.isRelease() == true);
    }
    else {
      assertTrue("Unknown build type -------> " + BuildConfig.BUILD_TYPE, false);
    }
  }
}