public void FirstSectionDoesNotNeedId() { WebAppTest(client => { ExecutorStub.SetupQuery <FindBsgSection, BsgDetail>((cmd, r) => { throw new DomainException("cannot call FindBsgSection with a null id"); }); var firstSection = Navigation.Order.First(); var firstAction = SectionActionStrategy.For(firstSection).Action(null); client.Get(firstAction); }); }
public void AllSectionsHaveActions() { var sectionActions = new List <string>(); foreach (Sections section in Enum.GetValues(typeof(Sections))) { if (FeatureToggles.SkipWorkInProgressSection(section)) { continue; } var strategy = SectionActionStrategy.For(section); var action = strategy.Action("formId"); action.Should().NotBeNullOrWhiteSpace(); action.Should().Contain("formId"); sectionActions.Contains(action).Should().BeFalse("Action {0} should only be used once", action); sectionActions.Add(action); } }