Package ca.wowapi

Source Code of ca.wowapi.RealmAPITest

package ca.wowapi;

import java.io.IOException;
import java.util.List;

import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;

import ca.wowapi.entities.Realm;

public class RealmAPITest {
 
  static RealmAPI realmAPI;
 
  @BeforeClass
  public static void setup() throws IOException {
    realmAPI = new RealmAPI()
  }

  @Test
  public void getRealmByNameTest() {
    Realm r = realmAPI.getRealm("Ravencrest", RealmAPI.REGION_US);
    Assert.assertNotNull(r);
    Assert.assertEquals("Ravencrest", r.getName());
  }

  @Test
  public void getRealmListTest() {
    List<Realm> realms = realmAPI.getRealmList(RealmAPI.REGION_US);
    Assert.assertNotNull(realms);
    Assert.assertTrue(realms.size() > 1);
  }

  @Test
  public void getRealmNameListTest() {
    List<String> realmNames = realmAPI.getRealmNamesList(RealmAPI.REGION_US);
    Assert.assertNotNull(realmNames);
    Assert.assertTrue(realmNames.size() > 1);
  }
}
TOP

Related Classes of ca.wowapi.RealmAPITest

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.