public void Roles_Template_Test() { var template = new RolesTemplate(new SmartAppInfo() { Id = ApplicationId }, new List <string> { "Admin", "Editor", "Reader" }); var output = template.TransformText(); Assert.NotNull(output); Assert.NotEmpty(output); Assert.Contains($"namespace {ApplicationId}.Backend.Security", output); }
private void TransformRoles(SmartAppInfo manifest, List <string> roles) { var template = new RolesTemplate(manifest, roles); _writingService.WriteFile(Path.Combine(_context.BasePath, template.OutputPath), template.TransformText()); }
public void Roles_Template_NullParameter_Test() { var template = new RolesTemplate(null, null); Assert.Throws <NullReferenceException>(() => template.TransformText()); }