Пример #1
0
 public TestSuiteBuilder Add(TestGroupBuilder testGroup, int repeat = 1)
 {
     if (repeat <= 1)
     {
         _testGroups.Add(testGroup);
     }
     else
     {
         _testGroups.AddRange(Enumerable.Repeat(testGroup, repeat));
     }
     return(this);
 }
Пример #2
0
        public async Task Run()
        {
            _logger.LogInformation("Init Test Suite...");
            SetupHttp();

            var gamingTestGroup = new TestGroupBuilder()
                                  .Add <GetTeamsTest>("get-teams")
                                  .Add <AddTeamsTest>("add-teams")
                                  .Add <GetTeamDetailTest>("get-team-detail")
                                  .AddParallel <GetHeroesTest>("get-heroes")
                                  .AddParallel <GetMatchesTest>("get-matches")
                                  .Add <ResetTest>("reset");

            var gamingTestSuite = _testSuiteBuilderFactory.Create("gaming")
                                  .AddCommonTests()
                                  .AddAuthTests()
                                  .Add(gamingTestGroup)
                                  .Build();

            await gamingTestSuite.Run();
        }