Package info.bliki.api.query

Source Code of info.bliki.api.query.BaseQueryTest

package info.bliki.api.query;

import info.bliki.api.User;
import junit.framework.TestCase;

/**
* Base test case for all query test cases.
*/
public abstract class BaseQueryTest extends TestCase {

  public static final String DEFAULT_MEDIA_WIKI_API_URL = "http://meta.wikimedia.org/w/api.php";
  private static final String DEFAULT_USER = "wrong_user";
  private static final String DEFAULT_PASSWORD = "wrong_password";

  protected BaseQueryTest() {
  }

  protected BaseQueryTest(String name) {
    super(name);
  }

  protected User getAnonymousUser() {
    // no username and password
    return new User("", "", DEFAULT_MEDIA_WIKI_API_URL);
  }

  /**
   * Define <code>DEFAULT_USER</code> and <code>DEFAULT_PASSWORD</code> with a
   * correct user/password and modify the
   * <code>ParseTest#testParseRegisteredQuery()</code> JUnit method to test your
   * user.
   *
   * @return
   * @see ParseTest#testParseRegisteredQuery()
   */
  protected User getRegisteredUser() {
    return new User(DEFAULT_USER, DEFAULT_PASSWORD, DEFAULT_MEDIA_WIKI_API_URL);
  }
}
TOP

Related Classes of info.bliki.api.query.BaseQueryTest

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.