Esempio n. 1
0
        public void ValidationScriptsPartial_Template_Test()
        {
            var template = new LoginPartial(new SmartAppInfo {
                Id = ApplicationId
            });
            var output = template.TransformText();

            Assert.NotNull(output);
            Assert.NotEmpty(output);
        }
Esempio n. 2
0
        public void LoginPartialView_Template_Test()
        {
            var template = new LoginPartial(new SmartAppInfo {
                Id = ApplicationId
            });
            var output = template.TransformText();

            Assert.NotNull(output);
            Assert.NotEmpty(output);
            Assert.Contains($"@using {ApplicationId}.Backend.Models", output);
        }
Esempio n. 3
0
        public void LoginPartialView_Template_NullParameter_Test()
        {
            var template = new LoginPartial(null);

            Assert.Throws <NullReferenceException>(() => template.TransformText());
        }
Esempio n. 4
0
        private void TransformViewsSharedLoginPartial(SmartAppInfo manifest)
        {
            var template = new LoginPartial(manifest);

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