Sha256: aa1ad9af0d982f632b97791da067713f5152fbc0db8b06e8f3eff44b4c2dab7b
Contents?: true
Size: 915 Bytes
Versions: 27
Compression:
Stored size: 915 Bytes
Contents
using System.IO; using System.Linq; using DotLiquid; namespace Generators.Output { public static class TestClassRenderer { private static readonly string TemplateContents = File.ReadAllText(Path.Combine("Output", "TestClass.liquid")); private static readonly Template TestClassTemplate = Template.Parse(TemplateContents); public static string Render(TestClass testClass) { var templateData = new { CanonicalDataVersion = testClass.CanonicalDataVersion, UsingNamespaces = testClass.UsingNamespaces, ClassName = testClass.ClassName, TestMethods = testClass.TestMethods.Select(testMethod => new { Name = testMethod.MethodName, Body = testMethod.Body }) }; return TestClassTemplate.Render(Hash.FromAnonymousObject(templateData)); } } }
Version data entries
27 entries across 27 versions & 1 rubygems