示例#1
0
        public override bool Execute(Input input)
        {
            var make = new Maker(_solution);

            Console2.BreakLine();

            make.Email(input.In, input.Name, input.Action);

            return(true);
        }
示例#2
0
        public void Make_a_email()
        {
            // arrange
            var m = new Maker(new MiruSolution(_solutionDir));

            // act
            m.Email("Users", "User", "Welcome");

            // assert
            (m.Solution.FeaturesDir / "Users" / "UserWelcomeMail.cs")
            .ShouldExistAndContains(
                "namespace Shopifu.Features.Users",
                "public class UserWelcomeMail : Mailable");

            (m.Solution.FeaturesDir / "Users" / "UserWelcomeMail.cshtml")
            .ShouldExistAndContains(
                "@model Shopifu.Domain.User",
                "Content in markdown, @Model.Name!");
        }