コード例 #1
0
        public static IEnumerable <object[]> GetPageAndFeatureTemplatesForBuildAsync(string framework)
        {
            JoinableTaskContext    context = new JoinableTaskContext();
            JoinableTaskCollection tasks   = context.CreateCollection();

            context.CreateFactory(tasks);
            IEnumerable <object[]> result = new List <object[]>();

            switch (framework)
            {
            case "CodeBehind":
                result = context.Factory.Run(() => BuildCodeBehindFixture.GetPageAndFeatureTemplatesAsync(framework));
                break;

            case "MVVMBasic":
                result = context.Factory.Run(() => BuildMVVMBasicFixture.GetPageAndFeatureTemplatesAsync(framework));
                break;

            case "MVVMLight":
                result = context.Factory.Run(() => BuildMVVMLightFixture.GetPageAndFeatureTemplatesAsync(framework));
                break;

            case "CaliburnMicro":
                result = context.Factory.Run(() => BuildCaliburnMicroFixture.GetPageAndFeatureTemplatesAsync(framework));
                break;

            case "Prism":
                result = context.Factory.Run(() => BuildPrismFixture.GetPageAndFeatureTemplatesAsync(framework));
                break;
            }

            return(result);
        }
コード例 #2
0
        // Set a single programming language to stop the fixture using all languages available to it
        public static IEnumerable <object[]> GetProjectTemplatesForBuildAsync(string framework, string programmingLanguage)
        {
            JoinableTaskContext    context = new JoinableTaskContext();
            JoinableTaskCollection tasks   = context.CreateCollection();

            context.CreateFactory(tasks);
            IEnumerable <object[]> result = new List <object[]>();

            switch (framework)
            {
            case "CodeBehind":
                result = context.Factory.Run(() => BuildCodeBehindFixture.GetProjectTemplatesAsync(framework, programmingLanguage));
                break;

            case "MVVMBasic":
                result = context.Factory.Run(() => BuildMVVMBasicFixture.GetProjectTemplatesAsync(framework, programmingLanguage));
                break;

            case "MVVMLight":
                result = context.Factory.Run(() => BuildMVVMLightFixture.GetProjectTemplatesAsync(framework, programmingLanguage));
                break;

            case "CaliburnMicro":
                result = context.Factory.Run(() => BuildCaliburnMicroFixture.GetProjectTemplatesAsync(framework));
                break;

            case "LegacyFrameworks":
                result = context.Factory.Run(() => BuildRightClickWithLegacyFixture.GetProjectTemplatesAsync());
                break;

            case "Prism":
                result = context.Factory.Run(() => BuildPrismFixture.GetProjectTemplatesAsync(framework));
                break;

            default:
                result = context.Factory.Run(() => BuildFixture.GetProjectTemplatesAsync());
                break;
            }

            return(result);
        }
コード例 #3
0
 public BuildCaliburnMicroProjectTests(BuildCaliburnMicroFixture fixture)
 {
     _fixture = fixture;
 }