public void Generate_PathToFormModelEmpty_ShouldThrow() { Action action = () => _formModelGenerator.Generate(new List <FormField>(), string.Empty); var exception = Assert.Throws <ArgumentException>(action); Assert.Equal("Path to FormModel class not provided.", exception.Message); }
private static string GenerateFormModel(List <FormField> formFields, string pathToFormModel) { var formModelGenerator = new FormModelGenerator(); var formModelContent = formModelGenerator.Generate(formFields, pathToFormModel); return(formModelContent); }