public async Task GetChampionsAsyncTest_FreeToPlay() { IRiotClient client = new RiotClient(); var champions = await client.GetChampionsAsync(true); Assert.That(champions, Is.Not.Null); Assert.That(champions.Count, Is.LessThan(25)); }
public async Task GetChampionsAsyncTest() { IRiotClient client = new RiotClient(); var champions = await client.GetChampionsAsync(); Assert.That(champions, Is.Not.Null); Assert.That(champions.Count, Is.GreaterThan(100)); }
/// <summary>Registers the type mappings with the Unity container.</summary> /// <param name="container">The unity container to configure.</param> /// <remarks>There is no need to register concrete types such as controllers or API controllers (unless you want to /// change the defaults), as Unity allows resolving a concrete type even if it was not previously registered.</remarks> public static void RegisterTypes(IUnityContainer container) { // NOTE: To load from web.config uncomment the line below. Make sure to add a Microsoft.Practices.Unity.Configuration to the using statements. // container.LoadConfiguration(); container.RegisterType<List<Champion>>(); container.RegisterType<List<Draft>>(); var client = new RiotClient(); var championsApi = client.GetChampionsAsync().Result; championsApi.Sort((t1, t2) => t1.name.CompareTo(t2.name)); container.RegisterInstance<List<Champion>>(championsApi); container.RegisterInstance<List<Draft>>(new List<Draft>()); }