Example #1
0
        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);
        }
Example #2
0
        public void RoleEdit_Template_NullParameter_Test()
        {
            var template = new RoleEdit(null);

            Assert.Throws <NullReferenceException>(() => template.TransformText());
        }
Example #3
0
        private void TransformViewsRoleAdminRoleEdit(SmartAppInfo manifest)
        {
            var template = new RoleEdit(manifest);

            _writingService.WriteFile(Path.Combine(_context.BasePath, template.OutputPath), template.TransformText());
        }