Beispiel #1
0
 public void ShouldPassWithClientInfoAndNoToken()
 {
     var client = new WorldOfWarcraftClient(new WorldOfWarcraftClientSettings
     {
         ClientId     = Config["ClientId"],
         ClientSecret = Config["ClientSecret"],
         Region       = "us",
         Locale       = "en_US"
     });
 }
Beispiel #2
0
 public void ShouldPassWithTokenAndNoClientInfo()
 {
     var client = new WorldOfWarcraftClient(new WorldOfWarcraftClientSettings
     {
         Token = new BattleNetToken
         {
             AccessToken = "someencryptedstring"
         },
         Region = "us",
         Locale = "en_US"
     });
 }
        public void ShouldPass()
        {
            var wowClient = new WorldOfWarcraftClient(new WorldOfWarcraftClientSettings
            {
                ClientId     = Config["ClientId"],
                ClientSecret = Config["ClientSecret"],
                Region       = "us",
                Locale       = "en_US"
            });
            var character = wowClient.Characters.GetCharacterProfileSummaryAsync("stormrage", "maestero").GetAwaiter().GetResult();

            Assert.AreEqual(character.Name, "Maestero");
        }
Beispiel #4
0
        public void ShouldPass()
        {
            var wowClient = new WorldOfWarcraftClient(new WorldOfWarcraftClientSettings
            {
                ClientId     = Config["ClientId"],
                ClientSecret = Config["ClientSecret"],
                Region       = "us",
                Locale       = "en_US"
            });
            var realm = wowClient.Realms.GetRealmAsync("stormrage").GetAwaiter().GetResult();

            Assert.AreEqual(realm.Slug, "stormrage");
        }
Beispiel #5
0
        public void ShouldPass()
        {
            var battleNetClient = new BattleNetClient(new BattleNetClientSettings
            {
                ClientId     = Config["ClientId"],
                ClientSecret = Config["ClientSecret"],
                Scope        = "wow.profile",
                Region       = "us"
            });
            var token = battleNetClient.ClientCredentialsTokenRequest().GetAwaiter().GetResult();

            var wowClient = new WorldOfWarcraftClient(new WorldOfWarcraftClientSettings
            {
                Token  = token,
                Region = "us",
                Locale = "en_US"
            });
            var realm = wowClient.Realms.GetRealmAsync("stormrage").GetAwaiter().GetResult();

            Assert.AreEqual(realm.Slug, "stormrage");
        }