public void GenerateHTML_createPdf_File(
            TemplateGeneratorFactory templateGeneratorFactory,
            UserInformation userInformation)
        {
            //Arrange
            var _html = templateGeneratorFactory.GetHTMLString(userInformation);

            //Act

            //Assert
            Assert.IsNotEmpty(_html);
        }
        public void TryToGenerateHTML_WithNoName(
            TemplateGeneratorFactory templateGeneratorFactory,
            UserInformation userInformation)
        {
            //Arrange
            userInformation.Name = null;
            var _html = templateGeneratorFactory.GetHTMLString(userInformation);

            //Act

            //Assert
            Assert.IsEmpty(_html);
        }
        public override void Process(TagHelperContext context, TagHelperOutput output)
        {
            if (Items == null)
            {
                throw new Exception("item property of checkbox-list cannot be null");
            }

            if (string.IsNullOrEmpty(Name))
            {
                throw new Exception("name property of checkbox-list cannot be null or empty");
            }

            output.TagName = string.Empty;
            var templateGenerator = TemplateGeneratorFactory.GetTemplateGenerator(Template);
            var template          = templateGenerator.Generate(Name, Items);

            output.Content.SetHtmlContent(template);
        }
 void doCreateTemplate(string data)
 {
     Task.Factory.StartNew(() =>
     {
         try
         {
             ProjectSettings.SaveSettings(OptionsGuiData);
             OptionsGuiData.IsBusy = true;
             TemplateGeneratorFactory.Start(OptionsGuiData);
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
         }
         finally
         {
             OptionsGuiData.IsBusy = false;
         }
     });
 }