private string IsValid(bool expectedValue) { Engine engine = new Engine(); Store store = new Store(typeof(MockDomainModel)); MockDomainModel domainModel = GetModel(store); using (Transaction t = store.TransactionManager.BeginTransaction()) { ExtensibleMockModelElement serviceModel = new ExtensibleMockModelElement(store.DefaultPartition, string.Empty); MockCodeGenerationService cgs = new MockCodeGenerationService(expectedValue); TextTemplateHost host = new TextTemplateHost(domainModel, serviceModel, serviceModel, cgs); string transformResult = engine.ProcessTemplate( GetStandardTemplateHeader().Replace("/n", "") + @"<#= this.IsValid(CurrentElement.InvalidArtifactLink).ToString()#>", host); t.Rollback(); return(transformResult.Trim()); } }
private string IsValid(bool expectedValue) { Engine engine = new Engine(); Store store = new Store(typeof(MockDomainModel)); MockDomainModel domainModel = GetModel(store); using (Transaction t = store.TransactionManager.BeginTransaction()) { ExtensibleMockModelElement serviceModel = new ExtensibleMockModelElement(store.DefaultPartition, string.Empty); MockCodeGenerationService cgs = new MockCodeGenerationService(expectedValue); TextTemplateHost host = new TextTemplateHost(domainModel, serviceModel, serviceModel, cgs); string transformResult = engine.ProcessTemplate( GetStandardTemplateHeader().Replace("/n","") + @"<#= this.IsValid(CurrentElement.InvalidArtifactLink).ToString()#>", host); t.Rollback(); return transformResult.Trim(); } }