public EditAdminFieldViewModel(CustomPrompt customPrompt) { PromptNumber = customPrompt.CustomPromptNumber; Prompt = customPrompt.CustomPromptText; OptionsString = NewlineSeparatedStringListHelper.JoinNewlineSeparatedList(customPrompt.Options); IncludeAnswersTableCaption = true; }
public EditRegistrationPromptViewModel(CustomPrompt customPrompt) { PromptNumber = customPrompt.CustomPromptNumber; Prompt = customPrompt.CustomPromptText; Mandatory = customPrompt.Mandatory; OptionsString = NewlineSeparatedStringListHelper.JoinNewlineSeparatedList(customPrompt.Options); IncludeAnswersTableCaption = true; }
public void CustomPrompt_constructor_populates_options_with_single_entry() { // When var result = new CustomPrompt(1, "Test", "Option", false); // Then using (new AssertionScope()) { result.Options.Should().NotBeNull(); result.Options.Count.Should().Be(1); } }
public void CustomPrompt_constructor_populates_options_with_extra_newline_separated_entries() { // Given var options = "Option1\r\nOption2\r\n\r\nOption3\r\n\r\n\r\n\r\nOption4"; // When var result = new CustomPrompt(1, "Test", options, false); // Then using (new AssertionScope()) { result.Options.Should().NotBeNull(); result.Options.Count.Should().Be(4); } }