public void DetailsView_Template_NullParameter_Test()
        {
            var template = new DetailsTemplate(null, null);

            Assert.Throws <ArgumentNullException>(() => template.TransformText());
        }
        private void TransformViews(SmartAppInfo manifest)
        {
            var enabledEntities = manifest.DataModel.Entities.Where(e => !e.IsAbstract);

            foreach (var entity in enabledEntities)
            {
                var applicationId = manifest.Id;

                var createTemplate = new CreateTemplate(entity, applicationId);
                var editTemplate   = new EditTemplate(entity, applicationId);
                var detailTemplate = new DetailsTemplate(entity, applicationId);
                var deleteTemplate = new DeleteTemplate(entity, applicationId);
                var indexTemplate  = new IndexTemplate(entity, applicationId);

                _writingService.WriteFile(Path.Combine(_context.BasePath, createTemplate.OutputPath, entity.Id, "Create.cshtml"), createTemplate.TransformText());
                _writingService.WriteFile(Path.Combine(_context.BasePath, editTemplate.OutputPath, entity.Id, "Edit.cshtml"), editTemplate.TransformText());
                _writingService.WriteFile(Path.Combine(_context.BasePath, deleteTemplate.OutputPath, entity.Id, "Delete.cshtml"), deleteTemplate.TransformText());
                _writingService.WriteFile(Path.Combine(_context.BasePath, detailTemplate.OutputPath, entity.Id, "Details.cshtml"), detailTemplate.TransformText());
                _writingService.WriteFile(Path.Combine(_context.BasePath, indexTemplate.OutputPath, entity.Id, "Index.cshtml"), indexTemplate.TransformText());
            }
        }