public void AddMasterPageDirectivesMethod_CustomString_AppendsMasterDirective() { //Arrange var layoutTemplateHtmlProcessor = new MasterPageBuilder(); var htmlString = "Some html string"; //Act htmlString = layoutTemplateHtmlProcessor.AddMasterPageDirectives(htmlString); //Assert Assert.IsTrue(htmlString.StartsWith(MasterPageBuilderTests.masterPageDirective), "Master page doesn't start with" + MasterPageBuilderTests.masterPageDirective); }
Page PageForOption (OptionItem option) { var builder = new MasterPageBuilder (); if (option.Title == "Contacts") return builder.BuildContacts (option); if (option.Title == "Leads") return builder.BuildLeads (option); if (option.Title == "Accounts") return builder.BuildAccounts (option); if (option.Title == "Opportunities") return builder.BuildOpportunities (option); throw new NotImplementedException (string.Format ("Unknown menu option: {0}", option.Title)); }
Page PageForOption(OptionItem option) { var builder = new MasterPageBuilder(); if (option.Title == "Contacts") { return(builder.BuildContacts(option)); } if (option.Title == "Leads") { return(builder.BuildLeads(option)); } if (option.Title == "Accounts") { return(builder.BuildAccounts(option)); } if (option.Title == "Opportunities") { return(builder.BuildOpportunities(option)); } throw new NotImplementedException(string.Format("Unknown menu option: {0}", option.Title)); }