void CreateResolver()
 {
     project          = ProjectHelper.CreateProject();
     fakeGacService   = MockRepository.GenerateStub <IGlobalAssemblyCacheService>();
     fakePathResolver = new FakeTextTemplatingPathResolver();
     resolver         = new TextTemplatingAssemblyPathResolver(project, fakeGacService, fakePathResolver);
 }
 void CreateResolver()
 {
     project = ProjectHelper.CreateProject();
     fakeAssemblyParserService = new FakeAssemblyParserService();
     fakePathResolver          = new FakeTextTemplatingPathResolver();
     resolver = new TextTemplatingAssemblyPathResolver(project, fakeAssemblyParserService, fakePathResolver);
 }
        public void GenerateCode_CustomToolContextPassed_CustomToolContextUsedToCreateTextTemplatingFilePreproressor()
        {
            CreateCustomTool();
            IProject project = ProjectHelper.CreateProject();
            var      context = new CustomToolContext(project);

            customTool.GenerateCode(null, context);

            Assert.AreEqual(context, customTool.ContextPassedToCreateTextTemplatingFilePreprocessor);
        }
        public ActionResult Create([Bind(Include = "Id,Name,Description,UserId,DueDate,Priority,Budget")] Project project)
        {
            if (ModelState.IsValid)
            {
                ProjectHelper.CreateProject(project);
                db.SaveChanges();
                return(Redirect("~/Manage/index"));
            }
            ViewBag.UserId = User.Identity.GetUserId();

            return(View(project));
        }
Exemple #5
0
        public ActionResult Create([Bind(Include = "Id,Title,Description")] Project project)
        {
            if (ModelState.IsValid)
            {
                project.IsArchived = false;
                ProjectHelper.CreateProject(project);
                db.SaveChanges();
                return(Redirect("~/Manage/index"));
            }
            ViewBag.UserId = User.Identity.GetUserId();

            return(View(project));
        }
Exemple #6
0
 public ActionResult Create(string name)
 {
     ProjectHelper.CreateProject(name, User.Identity.GetUserId());
     return(RedirectToAction("Index", "Manage"));
 }
 public async Task <string> Initialize()
 {
     return(await _projectHelper.CreateProject(Name, "classlib"));
 }