public void ShouldHaveHelpText() { var target = new ProjectNameInput(); target.HelpText.ShouldBe(@"The organizational name for your project. Required when dashboard reporter is turned on. For example: Your project might be called 'consumer-loans' and it might contains sub-modules 'consumer-loans-frontend' and 'consumer-loans-backend'. | default: ''"); }
public Application(IAbout a) { var s = new InternalSaveActionSprite(); s.AttachSpriteTo(a.Content); s.WebService = new ApplicationWebService(); var pp = new ProjectNameInput(); pp.AttachControlTo(a.Content); var Files = new IHTMLDiv().AttachTo(a.Content); s.WhenReady( i => { Action Update = delegate { var sln = new SolutionBuilder { Name = pp.ProjectName.Text }; i.FileName = sln.Name + ".zip"; i.Clear(); Files.Clear(); sln.WriteTo( (SolutionFile f) => { new IHTMLPre { innerText = f.Name }.AttachTo(Files); i.Add(f.Name, f.Content); } ); }; pp.UpdateButton.TextChanged += delegate { }; pp.UpdateButton.Click += delegate { Update(); }; Update(); } ); }
public void ShouldHaveDefault() { var input = new ProjectNameInput { SuppliedInput = null }; var result = input.Validate(); result.ShouldBe(string.Empty); }
public void ShouldReturnName() { var input = new ProjectNameInput { SuppliedInput = "name" }; var result = input.Validate(); result.ShouldBe("name"); }