Package org.as.jtrello.tests

Source Code of org.as.jtrello.tests.GenericServiceTest

package org.as.jtrello.tests;

import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Properties;

import org.as.jtrello.JTrelloClient;
import org.junit.BeforeClass;

public abstract class GenericServiceTest {

  protected static JTrelloClient client;
  protected static Properties props;
 
  @BeforeClass
  public static void setUpBeforeClass() throws Exception {
    GenericServiceTest.props = new Properties();
    try {
      props.load(new InputStreamReader(GenericServiceTest.class.getClassLoader().getResourceAsStream("resources/testvalues.properties")));
    } catch (IOException e) {
      e.printStackTrace();
    }
    if (props.getProperty("TRELLO_SECRET_KEY") != "") {
      GenericServiceTest.client = new JTrelloClient(props.getProperty("TRELLO_API_KEY"), props.getProperty("TRELLO_SECRET_KEY"), props.getProperty("TRELLO_USER_TOKEN"));
    } else {
      GenericServiceTest.client = new JTrelloClient(props.getProperty("TRELLO_API_KEY"), props.getProperty("TRELLO_USER_TOKEN"));
    }
  }

}
TOP

Related Classes of org.as.jtrello.tests.GenericServiceTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.