当前位置: 首页>>代码示例>>C#>>正文


C# Suite类代码示例

本文整理汇总了C#中Suite的典型用法代码示例。如果您正苦于以下问题:C# Suite类的具体用法?C# Suite怎么用?C# Suite使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Suite类属于命名空间,在下文中一共展示了Suite类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Card

 public Card(Suite suite, string text, int value, bool shown=true)
 {
     Suite = suite;
     Title = text;
     Value = value;
     _shown = shown;
 }
开发者ID:innatepirate,项目名称:blackjackyo,代码行数:7,代码来源:Card.cs

示例2: SuiteNameCanBeModified

 public void SuiteNameCanBeModified()
 {
     var suite = new Suite(new TestFileSystemDirectory("root")) {Name = "test"};
     suite.Name.Should().Be("test");
     suite.Name = "test2";
     suite.Name.Should().Be("test2");
 }
开发者ID:zvrana,项目名称:bari,代码行数:7,代码来源:SuiteTest.cs

示例3: Deck

 public Deck(bool isAceHigh, bool useTrumps, Suite trump)
     : this()
 {
     Card.isAceHigh = isAceHigh;
     Card.useTrumps = useTrumps;
     Card.trump = trump;
 }
开发者ID:bezkalitnikov,项目名称:CardsLib,代码行数:7,代码来源:Deck.cs

示例4: PropertiesSection

 public PropertiesSection(Suite suite, IProjectGuidManagement projectGuidManagement, [TargetRoot] IFileSystemDirectory targetDir, IProjectPlatformManagement platformManagement)
     : base(suite)
 {
     this.projectGuidManagement = projectGuidManagement;
     this.targetDir = targetDir;
     this.platformManagement = platformManagement;
 }
开发者ID:zvrana,项目名称:bari,代码行数:7,代码来源:PropertiesSection.cs

示例5: ExtendWithDiscoveries

        /// <summary>
        /// Extends suite model with discovered information based on bari conventions
        /// </summary>        
        /// <param name="suite">The suite model to be extended with discoveries</param>
        public void ExtendWithDiscoveries(Suite suite)
        {
            var srcDir = suiteRoot.GetChildDirectory("src");
            srcDir.With(s => s.ChildDirectories.Do(
                moduleName =>
                {
                    Module module = suite.GetModule(moduleName);

                    var moduleDir = srcDir.GetChildDirectory(moduleName);
                    foreach (var projectName in moduleDir.ChildDirectories)
                    {
                        if (projectName.Equals("tests", StringComparison.InvariantCultureIgnoreCase))
                        {
                            // This is the special subdirectory for test projects
                            var testsDir = moduleDir.GetChildDirectory(projectName);
                            foreach (var testProjectName in testsDir.ChildDirectories)
                            {
                                var testProject = module.GetTestProject(testProjectName);
                                DiscoverProjectSources(testProject, testsDir.GetChildDirectory(testProjectName));
                            }
                        }
                        else
                        {
                            // This is a project directory

                            Project project = module.GetProject(projectName);
                            DiscoverProjectSources(project, moduleDir.GetChildDirectory(projectName));
                        }
                    }
                }));
        }
开发者ID:zvrana,项目名称:bari,代码行数:35,代码来源:ModuleProjectDiscovery.cs

示例6: SetUp

        public void SetUp()
        {
            kernel = new StandardKernel();
            Kernel.RegisterCoreBindings(kernel);
            kernel.Bind<IFileSystemDirectory>().ToConstant(new TestFileSystemDirectory("root")).WhenTargetHas
                <SuiteRootAttribute>();

            output = new TestUserOutput();
            kernel.Bind<IUserOutput>().ToConstant(output).InSingletonScope();

            suite = kernel.Get<Suite>();
            suite.Name = "test suite";
            var mod1 = suite.GetModule("first module");
            var mod2 = suite.GetModule("other module");
            var mod3 = suite.GetModule("last module");

            var proj11 = mod1.GetProject("project 1.1");
            var proj12 = mod1.GetProject("project 1.2");
            var proj31 = mod3.GetProject("project 3.1");

            mod1.GetTestProject("test1");
            mod2.GetTestProject("test2");

            var cs = proj31.GetSourceSet("cs");
            var vb = proj31.GetSourceSet("vb");
            var fs = proj31.GetSourceSet("fs");

            cs.Add(new SuiteRelativePath("a.cs"));
            cs.Add(new SuiteRelativePath("b.cs"));
            cs.Add(new SuiteRelativePath("c.cs"));
            
            vb.Add(new SuiteRelativePath("x.vb"));
        }
开发者ID:zvrana,项目名称:bari,代码行数:33,代码来源:InfoTest.cs

示例7: ReferencesSection

 /// <summary>
 /// Initializes the class
 /// </summary>
 /// <param name="suite">Active suite</param>
 /// <param name="projectGuidManagement">Project GUID management service</param>
 /// <param name="sourceSetName">Source set name</param>
 /// <param name="targetDir">Target directory where the compiled files will be placed</param>
 public ReferencesSection(Suite suite, IProjectGuidManagement projectGuidManagement, string sourceSetName, [TargetRoot] IFileSystemDirectory targetDir)
     : base(suite)
 {
     this.projectGuidManagement = projectGuidManagement;
     this.sourceSetName = sourceSetName;
     this.targetDir = targetDir;
 }
开发者ID:zvrana,项目名称:bari,代码行数:14,代码来源:ReferencesSection.cs

示例8: AddonSupportSolutionItemProvider

 public AddonSupportSolutionItemProvider([TargetRoot] IFileSystemDirectory targetRoot, Suite suite, [Current] ICommand currentCommand, ICommandTargetParser targetParser)
 {
     this.targetRoot = targetRoot;
     this.suite = suite;
     this.currentCommand = currentCommand;
     this.targetParser = targetParser;
 }
开发者ID:zvrana,项目名称:bari,代码行数:7,代码来源:AddonSupportSolutionItemProvider.cs

示例9: GetAllSuites

        /// <summary>
        /// Gets all suites.
        /// </summary>
        /// <param name="subSuitesCore">The sub suites core.</param>
        /// <returns>list of all suites</returns>
        public static ObservableCollection<Suite> GetAllSuites(ITestSuiteCollection subSuitesCore)
        {
            ObservableCollection<Suite> subSuites = new ObservableCollection<Suite>();
            foreach (ITestSuiteBase currentSuite in subSuitesCore)
            {
                if (currentSuite != null)
                {
                    currentSuite.Refresh();
                    ObservableCollection<Suite> childred = null;
                    if (currentSuite is IStaticTestSuite)
                    {
                        IStaticTestSuite suite = currentSuite as IStaticTestSuite;
                        if (suite.SubSuites != null && suite.SubSuites.Count > 0)
                        {
                            childred = GetAllSuites(suite.SubSuites);
                        }
                    }
                    Suite newSuite = new Suite(currentSuite.Title, currentSuite.Id, childred);

                    // Cannot add suites to requirements based suite
                    if (currentSuite is IRequirementTestSuite)
                    {
                        newSuite.IsPasteEnabled = false;
                        newSuite.IsSuiteAddEnabled = false;
                        newSuite.IsAddSuiteAllowed = false;
                        newSuite.IsPasteAllowed = false;
                    }
                    SetParentToAllChildrenSuites(childred, newSuite);
                 
                    subSuites.Add(newSuite);
                }
            }

            return subSuites;
        }
开发者ID:ypupo2002,项目名称:tfs-testcasemanager,代码行数:40,代码来源:TestSuiteManager.cs

示例10: ProjectsDiscovered

        public void ProjectsDiscovered()
        {
            var fs = new TestFileSystemDirectory("root",
                                     new TestFileSystemDirectory("src",
                                                                 new TestFileSystemDirectory("Module1",
                                                                     new TestFileSystemDirectory("Project11")),
                                                                 new TestFileSystemDirectory("Module2"),
                                                                 new TestFileSystemDirectory("Module3",
                                                                     new TestFileSystemDirectory("Project31"),
                                                                     new TestFileSystemDirectory("Project32"))),
                                     new TestFileSystemDirectory("output"));

            var suite = new Suite(fs);

            suite.Modules.Should().BeEmpty();

            var discovery = new ModuleProjectDiscovery(fs);
            discovery.ExtendWithDiscoveries(suite);

            suite.Modules.Should().HaveCount(3);
            suite.Modules.Should().OnlyContain(m => m.Name == "Module1" ||
                                                    m.Name == "Module2" ||
                                                    m.Name == "Module3");

            suite.GetModule("Module1").Projects.Should().HaveCount(1);
            suite.GetModule("Module1").Projects.Should().Contain(p => p.Name == "Project11");
            suite.GetModule("Module2").Projects.Should().HaveCount(0);
            suite.GetModule("Module3").Projects.Should().HaveCount(2);
            suite.GetModule("Module3").Projects.Should().Contain(p => p.Name == "Project31");
            suite.GetModule("Module3").Projects.Should().Contain(p => p.Name == "Project32");
        }
开发者ID:zvrana,项目名称:bari,代码行数:31,代码来源:ModuleProjectDiscoveryTest.cs

示例11: ExtendWithDiscoveries

        public void ExtendWithDiscoveries(Suite suite)
        {           
            var scriptsDir = suite.SuiteRoot.GetChildDirectory("scripts");
            if (scriptsDir != null)
            {
                BuildScriptMappings mappings;
                if (suite.HasParameters("build-scripts"))
                {
                    mappings = suite.GetParameters<BuildScriptMappings>("build-scripts");
                }
                else 
                {
                    mappings = new BuildScriptMappings();
                    suite.AddParameters("build-scripts", mappings);
                }

                foreach (var scriptFile in scriptsDir.Files)
                {
                    var ext = Path.GetExtension(scriptFile);
                    if (ext != null && ext.ToLowerInvariant() == ".py")
                    {
                        var script = new SimplePythonBuildScript(
                            new SuiteRelativePath(Path.Combine("scripts", scriptFile)),
                            suite.SuiteRoot);

                        mappings.Add(script.SourceSetName, script);

                        log.DebugFormat("Discovered build script: {0}", script.Name);
                    }
                }
            }
        }
开发者ID:zvrana,项目名称:bari,代码行数:32,代码来源:PythonBuildScriptDiscovery.cs

示例12: ExistingModulesMergedWithDiscoveredOnes

        public void ExistingModulesMergedWithDiscoveredOnes()
        {
            var fs = new TestFileSystemDirectory("root",
                                                 new TestFileSystemDirectory("src",
                                                                             new TestFileSystemDirectory("Module1",
                                                                                                         new TestFileSystemDirectory
                                                                                                             ("Project11"))));

            var suite = new Suite(fs);

            var module1 = suite.GetModule("Module1");
            var projectA = module1.GetProject("ProjectA");

            module1.Projects.Should().HaveCount(1);
            module1.Projects.Should().HaveElementAt(0, projectA);

            var discovery = new ModuleProjectDiscovery(fs);
            discovery.ExtendWithDiscoveries(suite);

            suite.Modules.Should().HaveCount(1);
            suite.Modules.Should().HaveElementAt(0, module1);
            module1.Projects.Should().HaveCount(2);
            module1.Projects.Should().Contain(projectA);
            module1.Projects.Should().Contain(p => p.Name == "Project11");
        }
开发者ID:vigoo,项目名称:bari,代码行数:25,代码来源:ModuleProjectDiscoveryTest.cs

示例13: StoresReferenceToRoot

        public void StoresReferenceToRoot()
        {
            var fs = new TestFileSystemDirectory("root");
            var suite = new Suite(fs);

            suite.SuiteRoot.Should().Be(fs);
        }
开发者ID:zvrana,项目名称:bari,代码行数:7,代码来源:SuiteTest.cs

示例14: HasModuleWorksCorrectly

        public void HasModuleWorksCorrectly()
        {
            var suite = new Suite(new TestFileSystemDirectory("root"));

            suite.HasModule("mod").Should().BeFalse();
            suite.GetModule("mod");
            suite.HasModule("mod").Should().BeTrue();
        }
开发者ID:zvrana,项目名称:bari,代码行数:8,代码来源:SuiteTest.cs

示例15: GetModuleCreatesInstanceIfMissing

        public void GetModuleCreatesInstanceIfMissing()
        {
            var suite = new Suite(new TestFileSystemDirectory("root"));
            var mod1 = suite.GetModule("mod");

            mod1.Should().NotBeNull();
            mod1.Name.Should().Be("mod");
        }
开发者ID:zvrana,项目名称:bari,代码行数:8,代码来源:SuiteTest.cs


注:本文中的Suite类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。