コード例 #1
0
ファイル: TestCaseFactory.cs プロジェクト: priyaravi06/Meissa
        public static List <TestCase> CreateMany(List <string> testCaseCategoryNames)
        {
            var fixture = FixtureFactory.Create();

            fixture.Customize <TestCase>(tc => tc.With(x => x.Categories, testCaseCategoryNames));

            var result = fixture.CreateMany <TestCase>();

            return(result.ToList());
        }
コード例 #2
0
        public static IQueryable <TestRunLogDto> CreateMany(Guid testRunId, TestRunLogStatus testRunLogStatus = TestRunLogStatus.Published, int count = 3)
        {
            var fixture = FixtureFactory.Create();

            fixture.Customize <TestRunLogDto>(tr => tr.With(x => x.TestRunId, testRunId).With(x => x.Status, testRunLogStatus));

            var result = fixture.CreateMany <TestRunLogDto>(count).AsQueryable();

            return(result);
        }
コード例 #3
0
ファイル: TestRunFactory.cs プロジェクト: tokarthik/Meissa
        public static IQueryable <TestRunDto> CreateMany(Guid testRunId)
        {
            var fixture = FixtureFactory.Create();

            fixture.Customize <TestRunDto>(tr => tr.With(x => x.TestRunId, testRunId));

            var result = fixture.CreateMany <TestRunDto>().AsQueryable();

            return(result);
        }
コード例 #4
0
ファイル: TestRunFactory.cs プロジェクト: priyaravi06/Meissa
        public static IQueryable <TestRunDto> CreateSingleInProgress(Guid testRunId)
        {
            var fixture = FixtureFactory.Create();

            fixture.Register(() => TestRunStatus.InProgress);
            fixture.Customize <TestRunDto>(tr => tr.With(x => x.TestRunId, testRunId));

            var result = fixture.CreateMany <TestRunDto>(1).AsQueryable();

            return(result);
        }
コード例 #5
0
        public static IQueryable <TestAgentRunDto> CreateSingle(Guid testRunId, TestAgentRunStatus status, int testAgentId, int testAgentRunId)
        {
            var fixture = FixtureFactory.Create();

            fixture.Register(() => status);
            fixture.Customize <TestAgentRunDto>(ta => ta.With(x => x.TestRunId, testRunId).With(x => x.TestAgentId, testAgentId).With(x => x.TestAgentRunId, testAgentRunId));

            var result = fixture.CreateMany <TestAgentRunDto>(1).AsQueryable();

            return(result);
        }
コード例 #6
0
ファイル: TestCaseFactory.cs プロジェクト: priyaravi06/Meissa
        public static List <TestCase> CreateManyWithSingleMachineCategory(int testCasesCount)
        {
            var fixture            = FixtureFactory.Create();
            var testCaseCategories = fixture.CreateMany <string>().ToList();

            testCaseCategories.Add(singleMachineTestCaseCategory);

            fixture.Customize <TestCase>(ts => ts.With(x => x.Categories, testCaseCategories));

            var result = fixture.CreateMany <TestCase>(testCasesCount);

            return(result.ToList());
        }
コード例 #7
0
ファイル: TestCaseFactory.cs プロジェクト: priyaravi06/Meissa
        public static List <TestCase> CreateSingleWithManyTestCasesOnlyOneTestCaseWithCategory(string testCaseCategoryName)
        {
            var testCaseCategories = new List <string> {
                testCaseCategoryName
            };
            var fixture = FixtureFactory.Create();

            fixture.Customize <TestCase>(tc => tc.With(x => x.Categories, testCaseCategories));

            var result = fixture.CreateMany <TestCase>(1);

            return(result.ToList());
        }
コード例 #8
0
        public static IQueryable <TestAgentRunDto> CreateManyCompletedAndManyAborted(Guid testRunId)
        {
            var fixture = FixtureFactory.Create();

            fixture.Customize <TestAgentRunDto>(ta => ta.With(x => x.TestRunId, testRunId));
            fixture.Register(() => TestAgentRunStatus.Completed);

            var completedTestAgentRuns = fixture.CreateMany <TestAgentRunDto>();

            fixture.Register(() => TestAgentRunStatus.Aborted);
            var abortedTestAgentRuns = fixture.CreateMany <TestAgentRunDto>();

            return(completedTestAgentRuns.Union(abortedTestAgentRuns).AsQueryable());
        }