Exemplo n.º 1
0
        private void CreateJsonResponseFile(CreateUseCaseTaskParameter taskParam)
        {
            var outputDirectoryFullPath = Path.Combine(taskParam.WebProjectFullPath, "Debug", "JsonResponses");
            var fileName     = taskParam.ControllerName + taskParam.ActionName + "Response.jsons";
            var fileFullPath = Path.Combine(outputDirectoryFullPath, fileName);

            if (!Directory.Exists(outputDirectoryFullPath))
            {
                Directory.CreateDirectory(outputDirectoryFullPath);
            }
            File.Create(fileFullPath).Close();
        }
Exemplo n.º 2
0
        public void Run(CreateUseCaseTaskParameter taskParam)
        {
            var projectDirectoryFullPath = taskParam.ProjectDirectoryFullPath;

            var usecaseParam = new MakeUseCaseParameter(taskParam.ControllerName, taskParam.ActionName);

            CreateUsecaseTo("UseCase", projectDirectoryFullPath, usecaseParam, new UseCaseMaker());
            CreateUsecaseTo("MockUseCase", projectDirectoryFullPath, usecaseParam, new MockUseCaseMaker());
            CreateUsecaseTo("Domain", projectDirectoryFullPath, usecaseParam, new DomainUseCaseMaker());

            var registerParameter = new UseCaseRegisterParameter(taskParam.WebProjectFullPath, taskParam.ControllerName, taskParam.ActionName);

            RegisterUseCase(registerParameter);

            CreateJsonResponseFile(taskParam);
        }