Android Open Source - android-properties Config Test






From Project

Back to project page android-properties.

License

The source code is released under:

Apache License

If you think the Android project android-properties listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.github.fernandodev.androidproperties.lib;
/*from  w  w  w .  ja  va  2  s  .c  om*/
import android.app.Application;
import android.test.ApplicationTestCase;

/**
 * Created by fernando on 9/13/14.
 */
public class ConfigTest extends ApplicationTestCase<Application> {

  Config config;

  public ConfigTest() {
    super(Application.class);
  }

  @Override
  protected void setUp() throws Exception {
    super.setUp();
    config = new Config(getContext());
    createApplication();
  }

  public void testMaxMessages(){
    int maxMessages = config.maxMessages;
    assertEquals(10, maxMessages);
  }

  public void testTax(){
    double tax = config.tax;
    assertEquals(3.15146568, tax);
  }

  public void testHelloWorld(){
    String myMessage = config.myMessage;
    assertEquals("Hello World", myMessage);
  }

  public void testFlag(){
    boolean flag = config.flag;
    assertEquals(true, flag);
  }

  public void testRate(){
    float rate = config.rate;
    assertEquals(0.23f, rate);
  }
}




Java Source Code List

com.github.fernandodev.androidproperties.lib.AssetsPropertiesTest.java
com.github.fernandodev.androidproperties.lib.AssetsProperties.java
com.github.fernandodev.androidproperties.lib.ConfigTest.java
com.github.fernandodev.androidproperties.lib.Config.java
com.github.fernandodev.androidproperties.lib.Property.java
com.github.fernandodev.androidproperties.sample.AnotherConfig.java
com.github.fernandodev.androidproperties.sample.Config.java
com.github.fernandodev.androidproperties.sample.MainActivity.java