コード例 #1
0
        public void choose_the_floating_edge_feed_by_flag()
        {
            var input = new NewCommandInput
            {
                FloatingFlag = true
            };

            input.RippleFlag.ShouldEqual(FeedChoice.FloatingEdge);
        }
コード例 #2
0
ファイル: NewCommandInputTester.cs プロジェクト: KevM/fubu
        public void solution_path_is_just_current_plus_solution_name_by_default()
        {
            var input = new NewCommandInput
            {
                SolutionName = "MySolution"
            };

            input.SolutionDirectory().ToFullPath()
                 .ShouldEqual(Environment.CurrentDirectory.AppendPath("MySolution").ToFullPath());
        }
コード例 #3
0
ファイル: NewCommandTester.cs プロジェクト: KevM/fubu
        public void add_no_views_home_page_if_there_are_no_views()
        {
            var input = new NewCommandInput
            {
                SolutionName = "FubuMVC.Scenarios",
                AppFlag = true,
            };

            var request = NewCommand.BuildTemplateRequest(input);
            request.Projects.Single().Alterations.ShouldContain("no-views");
        }
コード例 #4
0
ファイル: NewCommandTester.cs プロジェクト: jbogard/fubumvc
        public void no_project_if_profile_is_empty()
        {
            var input = new NewCommandInput
            {
                SolutionName = "NewThing",
                RippleFlag = FeedChoice.Edge,
                Profile = "empty"
            };

            TemplateRequest request = input.CreateRequestForSolution();

            request.Projects.Any().ShouldBeFalse();
        }
コード例 #5
0
ファイル: NewCommandTester.cs プロジェクト: KevM/fubu
        public void add_spark_but_not_no_views_if_spark_option_is_requested()
        {
            var input = new NewCommandInput
            {
                SolutionName = "FubuMVC.Scenarios",
                AppFlag = true,
                OptionsFlag = new string[]{"spark"}
            };

            var request = NewCommand.BuildTemplateRequest(input);
            request.Projects.Single().Alterations.ShouldNotContain("no-views");
            request.Projects.Single().Alterations.ShouldContain("spark");
        }
コード例 #6
0
ファイル: NewCommandTester.cs プロジェクト: jbogard/fubumvc
        public void default_ripple_is_public_only()
        {
            var input = new NewCommandInput
            {
                SolutionName = "NewThing",
            };

            TemplateRequest request = input.CreateRequestForSolution();

            request.Templates.ShouldContain("public-ripple");
            request.Templates.ShouldNotContain("edge-ripple");
            request.Templates.ShouldNotContain("floating-ripple");
        }
コード例 #7
0
        public void choose_the_public_ripple()
        {
            var input = new NewCommandInput
            {
                SolutionName = "NewThing",
                RippleFlag = FeedChoice.PublicOnly
            };

            var request = input.CreateRequestForSolution();

            request.Templates.ShouldContain("public-ripple");
            request.Templates.ShouldNotContain("edge-ripple");
            request.Templates.ShouldNotContain("floating-ripple");
        }
コード例 #8
0
ファイル: NewCommandTester.cs プロジェクト: KevM/fubu
        public void adds_in_the_testing_request_if_app_and_tests_are_selected()
        {
            var input = new NewCommandInput
            {
                SolutionName = "NewThing",
                AppFlag = true,
                TestsFlag = true
            };

            var request = NewCommand.BuildTemplateRequest(input);
            var testingRequest = request.TestingProjects.Single();

            testingRequest.ShouldNotBeNull();
            testingRequest.OriginalProject.ShouldEqual("NewThing");
            testingRequest.Name.ShouldEqual("NewThing.Testing");
            testingRequest.Template.ShouldEqual("baseline");

            testingRequest.Alterations.Single().ShouldEqual("unit-testing");
        }
コード例 #9
0
ファイル: NewCommandTester.cs プロジェクト: jbogard/fubumvc
        public void SetUp()
        {
            var input = new NewCommandInput
            {
                SolutionName = "NewThing",
                Profile = "web-app",
            };

            TemplateRequest request = input.CreateRequestForSolution();

            project = request.Projects.Single();
        }
コード例 #10
0
        public void no_profile_adds_a_web_app_project_and_tests()
        {
            var input = new NewCommandInput
            {
                SolutionName = "MyCompany.NewThing",
                RippleFlag = FeedChoice.Edge,
                ShortNameFlag = "NewThang",
            };

            var request = input.CreateRequestForSolution();
            request.Projects.Any().ShouldBeTrue();
            request.TestingProjects.Any().ShouldBeTrue();
        }
コード例 #11
0
ファイル: NewCommandTester.cs プロジェクト: KevM/fubu
        public void no_project_if_app_flag_is_false()
        {
            var input = new NewCommandInput
            {
                SolutionName = "NewThing",
                RippleFlag = FeedChoice.Edge
            };

            input.AppFlag.ShouldBeFalse();

            var request = NewCommand.BuildTemplateRequest(input);

            request.Projects.Any().ShouldBeFalse();
        }
コード例 #12
0
        public void to_template_choices_basics()
        {
            var input = new NewCommandInput
            {
                SolutionName = "MyCompany.NewThing",
                RippleFlag = FeedChoice.Edge,
                ShortNameFlag = "NewThang",
                NoTestsFlag = true,
                OptionsFlag = new string[]{"a", "b", "c"}
            };

            var choices = input.ToTemplateChoices();
            choices.Category.ShouldEqual("new");
            choices.ProjectName.ShouldEqual(input.SolutionName);
            choices.ProjectType.ShouldEqual(input.Profile);
            choices.Options.ShouldHaveTheSameElementsAs("a", "b", "c");
        }
コード例 #13
0
        public void sets_the_short_name_of_the_project_by_explicit_flag()
        {
            var input = new NewCommandInput
            {
                SolutionName = "MyCompany.NewThing",
                RippleFlag = FeedChoice.Edge,
                ShortNameFlag = "NewThang"
            };

            var request = input.CreateRequestForSolution();

            request.Substitutions.ValueFor(ProjectPlan.SHORT_NAME)
                .ShouldEqual("NewThang");
        }
コード例 #14
0
        public void sets_the_dot_net_version()
        {
            var input = new NewCommandInput
            {
                SolutionName = "MyCompany.NewThing",
                RippleFlag = FeedChoice.Edge,
                DotNetFlag = DotNetVersion.V45
            };

            var request = input.CreateRequestForSolution();

            request.Projects.First()
                .Version.ShouldEqual(input.DotNetFlag);

            request.TestingProjects.First()
                .Version.ShouldEqual(input.DotNetFlag);
        }
コード例 #15
0
        public void profile_is_empty_no_project_requests()
        {
            var input = new NewCommandInput
            {
                SolutionName = "MyCompany.NewThing",
                RippleFlag = FeedChoice.Edge,
                ShortNameFlag = "NewThang",
                Profile = "empty"
            };

            var request = input.CreateRequestForSolution();
            request.Projects.Any().ShouldBeFalse();
        }
コード例 #16
0
ファイル: NewCommandTester.cs プロジェクト: KevM/fubu
        public void new_project_request_gets_the_assembly_version_alteration()
        {
            var input = new NewCommandInput
            {
                SolutionName = "NewThing",
                AppFlag = true
            };

            var request = NewCommand.BuildTemplateRequest(input);
            request.Projects.Single().Template.ShouldContain("baseline");
        }
コード例 #17
0
ファイル: NewCommandTester.cs プロジェクト: KevM/fubu
        public void choose_the_edge_ripple()
        {
            var input = new NewCommandInput
            {
                SolutionName = "NewThing",
                RippleFlag = FeedChoice.Edge
            };

            var request = NewCommand.BuildTemplateRequest(input);

            request.Templates.ShouldNotContain("public-ripple");
            request.Templates.ShouldContain("edge-ripple");
            request.Templates.ShouldNotContain("floating-ripple");
        }
コード例 #18
0
ファイル: NewCommandTester.cs プロジェクト: KevM/fubu
        public void no_tests_if_no_tests_flag()
        {
            var input = new NewCommandInput
            {
                SolutionName = "NewThing",
                AppFlag = true,
                TestsFlag = false
            };

            var request = NewCommand.BuildTemplateRequest(input);
            request.TestingProjects.Any().ShouldBeFalse();
        }
コード例 #19
0
ファイル: NewCommandTester.cs プロジェクト: KevM/fubu
        public void SetUp()
        {
            var input = new NewCommandInput
            {
                SolutionName = "NewThing",
                AppFlag = true
            };

            var request = NewCommand.BuildTemplateRequest(input);

            project = request.Projects.Single();
        }
コード例 #20
0
ファイル: NewCommandTester.cs プロジェクト: KevM/fubu
        public void supports_the_shortname_flag()
        {
            var input = new NewCommandInput
            {
                SolutionName = "FubuMVC.Scenarios",
                AppFlag = true,
                ShortNameFlag = "Foo"
            };

            var request = NewCommand.BuildTemplateRequest(input);

            request.Projects.Single().Substitutions.ValueFor(ProjectPlan.SHORT_NAME).ShouldEqual("Foo");
        }
コード例 #21
0
        public void no_tests_if_no_tests_flag_is_selected()
        {
            var input = new NewCommandInput
            {
                SolutionName = "MyCompany.NewThing",
                RippleFlag = FeedChoice.Edge,
                ShortNameFlag = "NewThang",
                NoTestsFlag = true
            };

            var request = input.CreateRequestForSolution();
            request.Projects.Any().ShouldBeTrue();
            request.TestingProjects.Any().ShouldBeFalse();
        }
コード例 #22
0
ファイル: NewCommandTester.cs プロジェクト: KevM/fubu
        public void default_ripple_is_public_only()
        {
            var input = new NewCommandInput
            {
                SolutionName = "NewThing",
            };

            var request = NewCommand.BuildTemplateRequest(input);

            request.Templates.ShouldContain("public-ripple");
            request.Templates.ShouldNotContain("edge-ripple");
            request.Templates.ShouldNotContain("floating-ripple");
        }