Ejemplo n.º 1
0
        public void SetUp()
        {
            var input = new NewCommandInput
            {
                SolutionName = "NewThing",
                Profile      = "web-app",
            };

            TemplateRequest request = input.CreateRequestForSolution();

            project = request.Projects.Single();
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 3
0
        public void sets_the_short_name_of_the_project_by_default()
        {
            var input = new NewCommandInput
            {
                SolutionName = "MyCompany.NewThing",
                RippleFlag   = FeedChoice.Edge
            };

            var request = input.CreateRequestForSolution();

            request.Substitutions.ValueFor(ProjectPlan.SHORT_NAME)
            .ShouldEqual("NewThing");
        }
Ejemplo n.º 4
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");
        }
Ejemplo n.º 5
0
        public void choose_the_edge_ripple()
        {
            var input = new NewCommandInput
            {
                SolutionName = "NewThing",
                RippleFlag   = FeedChoice.Edge
            };

            var request = input.CreateRequestForSolution();

            request.Templates.ShouldNotContain("public-ripple");
            request.Templates.ShouldContain("edge-ripple");
            request.Templates.ShouldNotContain("floating-ripple");
        }
Ejemplo n.º 6
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();
        }
Ejemplo n.º 7
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();
        }
Ejemplo n.º 8
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();
        }
Ejemplo n.º 9
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);
        }