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