/// <summary> /// Setup a server and client fixture. /// </summary> /// <param name="writer">The test output writer.</param> public async Task OneTimeSetUpAsync(TextWriter writer = null) { // pki directory root for test runs. m_pkiRoot = Path.GetTempPath() + Path.GetRandomFileName(); // start Ref server m_serverFixture = new ServerFixture <ReferenceServer> { UriScheme = m_uriScheme, SecurityNone = true, AutoAccept = true }; if (writer != null) { m_serverFixture.TraceMasks = Utils.TraceMasks.All; } m_server = await m_serverFixture.StartAsync(writer ?? TestContext.Out, m_pkiRoot).ConfigureAwait(false); m_clientFixture = new ClientFixture(); await m_clientFixture.LoadClientConfiguration(m_pkiRoot).ConfigureAwait(false); m_clientFixture.Config.TransportQuotas.MaxMessageSize = m_clientFixture.Config.TransportQuotas.MaxBufferSize = 4 * 1024 * 1024; m_url = new Uri(m_uriScheme + "://localhost:" + m_serverFixture.Port.ToString()); try { m_session = await m_clientFixture.ConnectAsync(m_url, SecurityPolicies.Basic256Sha256).ConfigureAwait(false); } catch (Exception e) { Assert.Ignore("OneTimeSetup failed to create session, tests skipped. Error: {0}", e.Message); } }
public TokenIntegrationTests(ServiceProviderFixture serviceProviderFixture) { this.clientFixture = new ClientFixture(serviceProviderFixture); var collection = new ServiceCollection(); collection.AddHttpClient(DefaultClientNames.Authorization); this.provider = collection.BuildServiceProvider(); }
public void Test() { var fixture = new ClientFixture(); var configTest = new ConfigTest(fixture); configTest.LoadConfiguration(); configTest.SetConfiguration(); configTest.LoadReloadConfiguration(); configTest.SetReloadConfiguration(); }
/// <summary> /// Setup. /// </summary> public GetRealtimeMatchStats_Tests(ClientFixture fixture) : base(fixture) { var response = DotaApiClient.GetTopLiveGamesAsync() .Result; SleepAfterSendingRequest(); if (response.Successful) { _liveMatchServerIds = response.Contents .Where(m => m.ServerSteamId != 0) .Select(m => m.ServerSteamId) .Take(5) .ToList(); if (_liveMatchServerIds.Count == 0) { throw new Exception("Can't get live matches from api"); } } else { throw new Exception("Can't get live matches from api"); } }
/// <summary> /// Setup /// </summary> public GetSteamUsers_Tests(ClientFixture fixture) : base(fixture) { }
/// <summary> /// Setup /// </summary> public GetDotaTeam_Tests(ClientFixture fixture) : base(fixture) { }
public IdentificationTypeClientTest(ClientFixture clientFixture) : base(clientFixture) { identificationTypeClient = new IdentificationTypeClient(); }
public CustomerClientTest(ClientFixture clientFixture) : base(clientFixture) { client = new CustomerClient(); cardTokenClient = new CardTokenTestClient(); }
/// <summary> /// Setup /// </summary> public GetItemIconPath_Tests(ClientFixture fixture) : base(fixture) { }
public GetPlayerProfile_Tests(ClientFixture fixture) : base(fixture) { }
public TokenIntegrationTests(ServiceProviderFixture serviceProviderFixture) { this.clientFixture = new ClientFixture(serviceProviderFixture); }
/// <summary> /// Setup /// </summary> public GetSteamFriendlists_Tests(ClientFixture fixture) : base(fixture) { }
/// <summary> /// Setup /// </summary> public GetLeaderboard_Tests(ClientFixture fixture) : base(fixture) { }
/// <summary> /// Setup /// </summary> public GetMatchDetails_Tests(ClientFixture fixture) : base(fixture) { }
public void SetFixture(ClientFixture data) { Client = data.Client; OnTestInit(); }
/// <summary> /// Setup. /// </summary> public GetStoreMetadata_Tests(ClientFixture fixture) : base(fixture) { }
/// <summary> /// Setup /// </summary> public GetSteamAccountBans_Tests(ClientFixture fixture) : base(fixture) { }
public EventsApiTests(ClientFixture <Startup> fixture) { Client = fixture.Client; }
/// <summary> /// Setup /// </summary> public GetTournamentPlayerStats_Tests(ClientFixture fixture) : base(fixture) { }
/// <summary> /// Setup /// </summary> public GetPlayerItems_Tests(ClientFixture fixture) : base(fixture) { }
/// <summary> /// Setup. /// </summary> public GetLeagueListing_Tests(ClientFixture fixture) : base(fixture) { }
/// <summary> /// Setup /// </summary> public GetAppNews_Tests(ClientFixture fixture) : base(fixture) { }
/// <summary> /// Setup /// </summary> public GetSteamProducts_Tests(ClientFixture fixture) : base(fixture) { }
public ListItemTests(ListItemFixture fixture) { _fixture = fixture; _client = _fixture.Client; }
/// <summary> /// Setup /// </summary> public GetTournamentPrizePool_Tests(ClientFixture fixture) : base(fixture) { }
/// <summary> /// Setup /// </summary> public GetSchemaUrl_Tests(ClientFixture fixture) : base(fixture) { }
/// <summary> /// Setup /// </summary> /// <param name="fixture"></param> public GetDotaTeamInfosById_Tests(ClientFixture fixture) : base(fixture) { }
/// <summary> /// Setup /// </summary> public GetHeroes_Tests(ClientFixture fixture) : base(fixture) { }
/// <summary> /// Setup /// </summary> public GetRecentDcpEvents_Tests(ClientFixture fixture) : base(fixture) { }
public AdvancedPaymentClientTest(ClientFixture clientFixture) : base(clientFixture) { cardTokenClient = new CardTokenTestClient(); client = new AdvancedPaymentClient(); }