Example #1
0
        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");
        }
Example #2
0
        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();
        }
Example #3
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");
        }
Example #4
0
        public void SetUp()
        {
            var input = new NewCommandInput
            {
                SolutionName = "NewThing",
                Profile = "web-app",
            };

            TemplateRequest request = input.CreateRequestForSolution();

            project = request.Projects.Single();
        }
Example #5
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();
        }
Example #6
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");
        }
Example #7
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);
        }
Example #8
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();
        }
Example #9
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();
        }