Example #1
0
 public EditAdminFieldViewModel(CustomPrompt customPrompt)
 {
     PromptNumber  = customPrompt.CustomPromptNumber;
     Prompt        = customPrompt.CustomPromptText;
     OptionsString = NewlineSeparatedStringListHelper.JoinNewlineSeparatedList(customPrompt.Options);
     IncludeAnswersTableCaption = true;
 }
Example #2
0
 public EditRegistrationPromptViewModel(CustomPrompt customPrompt)
 {
     PromptNumber  = customPrompt.CustomPromptNumber;
     Prompt        = customPrompt.CustomPromptText;
     Mandatory     = customPrompt.Mandatory;
     OptionsString = NewlineSeparatedStringListHelper.JoinNewlineSeparatedList(customPrompt.Options);
     IncludeAnswersTableCaption = true;
 }
Example #3
0
        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);
            }
        }
Example #4
0
        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);
            }
        }