public void RoleEdit_Template_Test() { var template = new RoleEdit(new SmartAppInfo { Id = ApplicationId }); var output = template.TransformText(); Assert.NotNull(output); Assert.NotEmpty(output); Assert.Contains($"@model {ApplicationId}.Backend.Models.RoleViewModel", output); }
public void RoleEdit_Template_NullParameter_Test() { var template = new RoleEdit(null); Assert.Throws <NullReferenceException>(() => template.TransformText()); }
private void TransformViewsRoleAdminRoleEdit(SmartAppInfo manifest) { var template = new RoleEdit(manifest); _writingService.WriteFile(Path.Combine(_context.BasePath, template.OutputPath), template.TransformText()); }